[Issue 22579] betterC errors are issued by the glue layer and hence skipped without codegen
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Dec 8 22:20:10 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22579
--- Comment #6 from moonlightsentinel at disroot.org ---
Reduced example:
--- issue22579.d
// Use auto instead of int[] to force semantic on the function body
auto foo(int i)
{
return [i];
}
int[] bar()(int i)
{
return [i];
}
--- main.d
import issue22579;
extern(C) int main()
{
// foo is emitted for issue22579 and hence only causes errors when
// the it is a root module (-i or passed on the command line)
foo(1);
// bar is instantiated in / emitted to main and hence always
// triggers errors in the glue layer
// bar(2);
return 0;
}
---
dmd -betterC -c main.d
<Success>
dmd -betterC -c main.d issue22579.d
issue22579.d(4): Error: `TypeInfo` cannot be used with -betterC
--
More information about the Digitalmars-d-bugs
mailing list