String switch is odd using betterC
Abby
loniro7678 at twit-mail.com
Wed Feb 26 08:28:11 UTC 2020
On Wednesday, 26 February 2020 at 08:25:00 UTC, Abby wrote:
> /dlang/dmd/linux/bin64/../../src/druntime/import/object.d(2999): Error: TypeInfo cannot be used with -betterC
>
> Odd think is that wehen I remove g from my enum it compiles
> just fine, so it seems that this compilation error occurs only
> when my enum has more then 6 members.
>
> Any idea why?
Ok so this is enough to reproduce the problem
extern(C) void main()
{
auto s = "F";
final switch(s)
{
case "A": break;
case "B": break;
case "C": break;
case "D": break;
case "E": break;
case "F": break;
case "G": break;
}
}
More information about the Digitalmars-d-learn
mailing list