www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - can not find the error: Error: TypeInfo cannot be used with -betterC

reply Newbie2019 <newbie2019 gmail.com> writes:
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
next sibling parent aliak <something something.com> writes:
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
prev sibling parent Sebastiaan Koppe <mail skoppe.eu> writes:
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