-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
mGCA: Validate const literal against expected type #152001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| #[type_const] | ||
| const WRAP<T : ConstParamTy_> : T = { //~ ERROR: generic const items are experimental | ||
| Foo::<T>{field : 1} //~ ERROR: expected `T`, found {integer} | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I removed generic_const_parameter_types and added generic_const_items, ICE did not reproduce.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I tried adding both in one file, but when I place them together, the ICE doesn't work. haha,
I'll fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I was mistaken. The reason ICE didn't occur wasn't because I merged the two, but because I didn't add adt_const_params.
Still, I think it's better to separate the two, so I'll do that.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
close: #151625
close: #150983