need solution for find error : Error: `TypeInfo` cannot be used with -betterC
test123
test123 at gmail.com
Fri Jul 22 06:16:56 UTC 2022
On Friday, 22 July 2022 at 06:06:09 UTC, test123 wrote:
> some time a huge project build throw error: "Error: `TypeInfo`
> cannot be used with -betterC"
>
> and it work before some days ago, there is no array allow but
> throw this error. no location information (file and line).
>
>
> We need solution to improve the error message so people can
> find where to fix it.
not my first time find this problem. but this time is not make
no sense.
```d
import std.bitmanip : bitfields;
enum UserRole : ubyte {
None = 0,
}
alias UserIdT = ushort;
enum BIT_COUNT = 30;
enum MAX_COUNT = 2 ^^ BIT_COUNT;
struct UserSession {
union {
ulong uint64;
mixin(bitfields!(
UserIdT, "user_id", 16,
UserRole, "user_role", 2,
uint, "login_count", BIT_COUNT,
));
}
}
extern(C) void main(){
}
```
there is no array related code, but throw TypeInfo error
More information about the Digitalmars-d
mailing list