TelluIoT / ThingML

The ThingML modelling language
https://github.com/TelluIoT/ThingML
Apache License 2.0
101 stars 32 forks source link

False error : Expected Object[], assigned with Object #289

Closed fungiboletus closed 4 years ago

fungiboletus commented 4 years ago
property canards: Object[] = `[]` as Object[]
brice-morin commented 4 years ago

Just to be sure, are you using a recent version of ThingML ?

brice-morin commented 4 years ago

Nevermind, I reproduced the issue.

brice-morin commented 4 years ago

Note that in ThingML, arrays must have a size i.e. property canards: Object[8] =[]as Object[]

This is a limitation inherited from the Arduino compiler, but should not have any incidence in JS