-
Notifications
You must be signed in to change notification settings - Fork 1.1k
DO NOT merge: integrate fuzzing fixes #4489
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
``` Exception in thread "main" java.lang.AssertionError: assertion failed: position error: position not set for Ident(<error>) # 24 at dotty.DottyPredef$.assertFail(DottyPredef.scala:36) at dotty.tools.dotc.ast.Positioned.check$1(Positioned.scala:178) at dotty.tools.dotc.ast.Positioned.check$5$$anonfun$4(Positioned.scala:203) ```
This reverts commit 0f7b1b0 but keeps the testcase.
Deep findMember recursions can happen as a recult of illegal cyclic structures. I don't think there's a complete way to avoid these structures before the cyclic search can happen. So we now detect it by imposing a recursion limit (configurable, by default 100).
…ersected types Test every template and every type intersection for cycles in its members. The tests are done as early possible without causing spurious cycles, which for intersections means PostTyper, unfortunately. Still missing: Do the test also for members reachable in common value definitions.
Detect more cyclic references be generalizing the condition which prefixes are interesting.
- Move them all to TypeErrors.scala - Systematically use `toMessage` for reporting - Catch stack overflows instead of counting recursions
This now handles all errors from scala#4368 to scala#4372 and also scala#318.
Not needed here, but I missed the functionality elsewhere.
Once we are at it, let's try to bullet-proof everything.
Move it from `transformNode` to `goNamed` and `goUnnamed`. This might be faster since that way `transformNode` should be an inline candidate since it is short.
This patch addressed the problem at a better point I think: to typecheck ```scala class Foo extends someTree ``` we need to detect correctly if `someTree` should be typechecked as a term or a type; `Int => 1` should be typechecked as a type, even though it looks like a term according to `isTerm`. Really, we shouldn't use isType at all, because the user might write a type in place of a term or viceversa. I think we only want to know this is a constructor call or a type; and maybe we should just let the parser tell us which, since it knows.
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.
Hello, and thank you for opening this PR! 🎉
All contributors have signed the CLA, thank you! ❤️
Commit Messages
We want to keep history, but for that to actually be useful we have
some rules on how to format our commit messages (relevant xkcd).
Please stick to these guidelines for commit messages:
- Separate subject from body with a blank line
- When fixing an issue, start your commit message with
Fix #<ISSUE-NBR>:
- Limit the subject line to 72 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line ("Add" instead of "Added")
- Wrap the body at 80 characters
- Use the body to explain what and why vs. how
adapted from https://chris.beams.io/posts/git-commit
Have an awesome day! ☀️
Closing as this branch is stale and most underlying PRs have progressed. |
This branch contains fixes for fuzzing bugs discovered by @alexknvl — I put it together for retesting them and/or running the fuzzer again.