Skip to content

Commit d05358a

Browse files
committed
Fix "using" classes calling their function on the wrong type
1 parent bce83b8 commit d05358a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

polymod/hscript/_internal/PolymodInterpEx.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,19 +157,19 @@ class PolymodInterpEx extends Interp
157157

158158
@:privateAccess
159159
{
160-
if (_proxy != null && _proxy._cachedUsingFunctions.exists(f))
160+
if (func == null && _proxy != null && _proxy._cachedUsingFunctions.exists(f))
161161
{
162162
return _proxy._cachedUsingFunctions[f]([o].concat(args));
163163
}
164164
}
165165

166+
#if html5
166167
// Workaround for an HTML5-specific issue.
167168
// https://github.com/HaxeFoundation/haxe/issues/11298
168169
if (func == null && f == "contains") {
169170
func = get(o, "includes");
170171
}
171172

172-
#if html5
173173
// For web: remove is inlined so we have to use something else.
174174
if (func == null && f == "remove")
175175
{

0 commit comments

Comments
 (0)