bmx-ng / bcc

A next-generation bcc parser for BlitzMax
zlib License
33 stars 13 forks source link

Allow enum values to be used as a const for staticarray initialisation #568

Closed woollybah closed 2 years ago

woollybah commented 2 years ago

Since enum values are essentially consts, the following should work :

SuperStrict

Framework brl.standardio

Enum MyEnum
    first
    count
End Enum

Struct MyStruct
    Field StaticArray enumerated:Int[MyEnum.count]
End Struct

but fails because of the error : Static array initialiser must be constant