bmx-ng / bcc

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

Type inheritance enum compilation issue #623

Open thareh opened 1 year ago

thareh commented 1 year ago

Good day,

The following module will not compile:

SuperStrict

Module Test.Test

Framework BRL.Blitz
Import Text.Encoding

Type TFoo

    Method New(test:String, e:EStreamEncoding=Null)
    EndMethod

EndType

Type TBar Extends TFoo

EndType

"Unable to convert from Int to Enum EStreamEncoding."

Thanks!

woollybah commented 1 year ago

It's not a very good error message. It probably wants to be something else, like "Invalid enum value provided"...

thareh commented 1 year ago

So it should not compile?

It seems to work fine when not used within a module.

GWRon commented 1 year ago

Can enums default to...null?

Am 30. Mai 2023 14:50:53 MESZ schrieb Carl Husberg @.***>:

So it should not compile?

It seems to work fine when not used within a module.

-- Reply to this email directly or view it on GitHub: https://github.com/bmx-ng/bcc/issues/623#issuecomment-1568379560 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

thareh commented 1 year ago

Yes, but it just seems to use the first value in that case. (I thought perhaps it worked like an object and could really be null)