diff --git a/hscript/Interp.hx b/hscript/Interp.hx index 47515bdf..b6be7d7d 100644 --- a/hscript/Interp.hx +++ b/hscript/Interp.hx @@ -562,7 +562,8 @@ class Interp { return (v : Array).iterator(); if( v.iterator != null ) v = v.iterator(); #else - try v = v.iterator() catch( e : Dynamic ) {}; + #if (cpp) if ( v.iterator != null ) #end + try v = v.iterator() catch( e : Dynamic ) {}; #end if( v.hasNext == null || v.next == null ) error(EInvalidIterator(v)); return v;