| commit | 72bf188342a06d4c96a4b4a1be37bcd3f1ede6dc | [log] [tgz] |
|---|---|---|
| author | Johan Compagner <jcompagner@gmail.com> | Tue Feb 18 12:55:48 2014 +0100 |
| committer | Johan Compagner <jcompagner@gmail.com> | Tue Feb 18 13:07:13 2014 +0100 |
| tree | 7d0f5b9b96ed04fa6fddde5d12b7ffffe1087d25 | |
| parent | f15fa85b854aaf1b7366418b74c9140f868165ca [diff] |
the prototype given in the Object.create(SomeObject.prototype) should really be a copy Else overrrides on the sup object will change the original Problem is that changing the supers prototype after the sub created a copy is not seen anymore.
diff --git a/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/ti/TypeInferencerVisitor.java b/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/ti/TypeInferencerVisitor.java index f31370e..d7a785e 100644 --- a/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/ti/TypeInferencerVisitor.java +++ b/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/ti/TypeInferencerVisitor.java
@@ -596,7 +596,8 @@ && RTypes.OBJECT.getDeclaration().equals( method.getDeclaringType()) && arguments.length > 0) { AnonymousValue value = new AnonymousValue(); - value.addValue(arguments[0], false); + value.getValue().addValue( + ((IValueProvider) arguments[0]).getValue()); if (arguments.length == 2) { JSTypeSet types = arguments[1].getTypes(); for (IRType type : types) {