Thread overview | |||||
---|---|---|---|---|---|
|
July 17, 2019 can not find the error: Error: TypeInfo cannot be used with -betterC | ||||
---|---|---|---|---|
| ||||
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 ? |
July 17, 2019 Re: can not find the error: Error: TypeInfo cannot be used with -betterC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Newbie2019 | 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.
|
July 17, 2019 Re: can not find the error: Error: TypeInfo cannot be used with -betterC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Newbie2019 | 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.
|
Copyright © 1999-2021 by the D Language Foundation