File tree Expand file tree Collapse file tree
polymod/hscript/_internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,6 +69,13 @@ class PolymodInterpEx extends Interp
6969 var clsRef = PolymodStaticClassReference .tryBuild (cl );
7070 if (clsRef != null ) return clsRef .instantiate (args );
7171
72+ @:privateAccess
73+ if (getClassDecl ().imports != null && getClassDecl ().imports .exists (cl ))
74+ {
75+ var clsRef = PolymodStaticClassReference .tryBuild (getClassDecl ().imports .get (cl ).fullPath );
76+ if (clsRef != null ) return clsRef .instantiate (args );
77+ }
78+
7279 @:privateAccess
7380 if (getClassDecl ()?. pkg != null )
7481 {
@@ -242,6 +249,12 @@ class PolymodInterpEx extends Interp
242249
243250 for (key => imp in cls .importsToValidate )
244251 {
252+ if (_scriptClassDescriptors .exists (imp .fullPath ))
253+ {
254+ cls .imports .set (key , imp );
255+ continue ;
256+ }
257+
245258 if (_scriptEnumDescriptors .exists (imp .fullPath ))
246259 {
247260 cls .imports .set (key , imp );
You can’t perform that action at this time.
0 commit comments