Skip to content

Commit 166ee8f

Browse files
committed
RTypes.create() use current type system by default
1 parent add03f7 commit 166ee8f

File tree

1 file changed

+6
-1
lines changed
  • plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/javascript/typeinfo

1 file changed

+6
-1
lines changed

plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/javascript/typeinfo/RTypes.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.eclipse.core.runtime.RegistryFactory;
2020
import org.eclipse.dltk.javascript.core.JavaScriptPlugin;
2121
import org.eclipse.dltk.javascript.core.Types;
22+
import org.eclipse.dltk.javascript.internal.core.ThreadTypeSystemImpl;
2223
import org.eclipse.dltk.javascript.typeinfo.model.JSType;
2324
import org.eclipse.dltk.javascript.typeinfo.model.Member;
2425
import org.eclipse.dltk.javascript.typeinfo.model.Type;
@@ -193,7 +194,11 @@ public static IRArrayType arrayOf(ITypeSystem typeSystem,
193194
}
194195

195196
public static IRType create(JSType type) {
196-
return create(null, type);
197+
ITypeSystem current = ITypeSystem.CURRENT.get();
198+
if (current == null) {
199+
current = ThreadTypeSystemImpl.DELEGATING_TYPE_SYSTEM;
200+
}
201+
return create(current, type);
197202
}
198203

199204
public static IRType create(ITypeSystem context, JSType type) {

0 commit comments

Comments
 (0)