digitalmars.D.learn - can not find the error: Error: TypeInfo cannot be used with -betterC
- Newbie2019 (4/4) Jul 17 2019 when build my project with -betterC, it throw this error:
- aliak (6/10) Jul 17 2019 You usually get that *extrememly* unhelpful error message when
- Sebastiaan Koppe (6/10) Jul 17 2019 With ldc I often use -v to get the verbose output of the
when build my project with -betterC, it throw this error: Error: TypeInfo cannot be used with -betterC There is no location information about it, how can I find what code cause this ?
Jul 17 2019
On Wednesday, 17 July 2019 at 15:52:39 UTC, Newbie2019 wrote:when build my project with -betterC, it throw this error: Error: TypeInfo cannot be used with -betterC There is no location information about it, how can I find what code cause this ?You usually get that *extrememly* unhelpful error message when you use anything that uses TypeInfo. So it can be quite hard to figure out. Did it start happening after you added a class or did something with exceptions? At least those would cause that error.
Jul 17 2019
On Wednesday, 17 July 2019 at 15:52:39 UTC, Newbie2019 wrote:when build my project with -betterC, it throw this error: Error: TypeInfo cannot be used with -betterC There is no location information about it, how can I find what code cause this ?With ldc I often use -v to get the verbose output of the compiler. It will output what module it is compiling and in what stage. Often the module right before the error is the one you'll need to examine. I know, it stinks. Most often it is one of: arrays, ~=, typeid, throw, new, toString.
Jul 17 2019