-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Add regression test for issue #147146 ( ICE) #147159
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
Conversation
r? @davidtwco rustbot has assigned @davidtwco. Use |
|
The job Click to see the possible cause of the failure (guessed by this bot)
|
Hi, thanks for your pull request To get the CI checks to pass, could you please move your test file into a subdirectory under Let me know if you have any questions! |
// check-pass | ||
// compile-flags: --error-format=short |
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.
Problem: this is outdated syntax
// `typeof` is reserved but not implemented. | ||
// This should produce a normal error, not ICE. | ||
|
||
impl typeof(|| {}) {} |
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.
Question: what's the point of this regression test...? This test cannot possibly pass if the ICE isn't fixed
I'm going to close this PR because this regression test should just be included in the PR that actually fixes the ICE. Thanks for the interest. |
Add regression test for issue #147146 (ICE)
This PR adds a minimal UI test reproducing the ICE triggered by using typeof in an impl:
impl typeof(|| {}) {}
The compiler currently panics with an internal compiler error (ICE) when compiling this code.
This test ensures that future fixes to the compiler can be validated against this specific scenario.
Note: This PR does not fix the ICE itself; it only provides a regression test.
References: rust-lang#147146