[Issue 21477] New: TypeInfo errors in betterC are cryptic
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 13 04:14:55 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21477
Issue ID: 21477
Summary: TypeInfo errors in betterC are cryptic
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dave287091 at gmail.com
A minimal program, compiled with -betterC:
extern(C) int main(){
int[] foo = [1];
return 0;
}
Yields the error message:
bug.d(2): Error: TypeInfo cannot be used with -betterC
It is correct to error, but the error is hard to understand.
It would be much nicer nice if the error reported what it was trying to
generate type info for (the usage that forces generation of type info can be
very far from the declaration) and why TypeInfo was being generated in this
case.
Also, it is not clear to me that this is even the right error message. Why is
it complaining about TypeInfo when the real issue is you can’t use
runtime-managed dynamic arrays in betterC?
--
More information about the Digitalmars-d-bugs
mailing list