-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Set proper position for ValDefs generated from tuples #14513
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,8 @@ object Test { | |
// good syntax, bad semantics, detected by typer | ||
//gowild.scala:14: error: star patterns must correspond with varargs parameters | ||
val K(x @ _*) = k | ||
val K(ns @ _*, x) = k // error: pattern expected | ||
val K(ns @ _*, xx) = k // error: pattern expected | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an interesting case. I wonder if I should add another case for the duplicate name? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added a test, the error seems legit, though I have no idea why it popped up now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When multiple errors have the same position, we normally only display the first one. |
||
val K(x) = k // error: x is already defined as value x | ||
val (b, _ * ) = (5,6) // ok | ||
// no longer complains | ||
//bad-and-wild.scala:15: error: ')' expected but '}' found. | ||
|
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.
Removed the test because it was failing and since worksheets deprecated. I think the issue is more in the test than code itself.