-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Test that TypeTrees are not in an unexpected tree #14752
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
I wouldn't say that this fixes issue #1023, it is rather a first step towards having this infrastructure. |
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.
We should add tests for many of the combinations we want to catch.
One way is to create those trees with macros and let the Ycheck catch them. The issue is that this would end up in a crash of the compiler. We could start improving Ychecking and emit some kind of fatal errors instead. These errors should include the stack trace and explicitly mention that this was an unexpected state in the tree. The unexpected state in the tree could be due to a compiler bug or a bug in a macro.
Now that we're not running this on every `typed` invocation, the compilation unit tree isn't going to be a top-level TypeTree.
I'm not sure what I had hit that lead me to this exclusion, but I'm not hitting now..
Fixes #1023