armoha / euddraft

System for pluginizing eudplib codes.
Other
29 stars 4 forks source link

Compile error: 'EUDVariable' object has no attribute 'fields', when `a[0]` used as logical operand #83

Closed Chromowolf closed 1 year ago

Chromowolf commented 1 year ago

For euddraft0970 and later versions:

const a = PVariable();

function onPluginStart() {
    if (a[0]) {  // a[0]>0 also error
        // some statement
    }
}

Compile error: [Error] 'EUDVariable' object has no attribute 'fields'

armoha commented 1 year ago

This should be fixed in euddraft 0.9.7.4.

But new issue remains while moving optimizing pass from eudplib to epScript. In euddraft 0.9.7.4, if (a[0]) will call subscript while if (a[0] > 0) does in-place comparison. :(

armoha commented 1 year ago

Fixed confirmed in euddraft 0.9.7.7