-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #2675: Properly handle undetermined type variables in unapply #3889
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9ea9ef4
Fix #2675: Properly handle undetermined type variables in unapply
odersky c6fd150
Make Binds forward-referencable
odersky 57b61d2
Fix scanning for Bind nodes
odersky 8b9b455
Avoid creating BindDefinedType symbols
odersky 7453962
Drop BindDefinedType
odersky 219149f
Removed unused case in Unpickler
odersky e2d78ff
Fix previous merge breakage
odersky 570b941
Account for non-binding type Binds in patVars
odersky bf24d2b
Eliminate Binds without symbol in indexParams
odersky aea7064
Disable failing fromTasty test
odersky 75c78da
Tweak documentation
odersky 28eb1c3
Revert change to patVars
odersky 9dca57b
Test case for #1870
odersky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
object foo{ | ||
val x = List(1,2,3) | ||
x match { | ||
case t: List[tt] => t.head.asInstanceOf[tt] | ||
} | ||
} | ||
|
||
object bar { | ||
|
||
class C[T <: Seq[_]] | ||
|
||
val x: AnyRef = new C | ||
|
||
x match { | ||
case x: C[u] => | ||
def x: u = x | ||
val s: Seq[_] = x | ||
} | ||
} | ||
|
||
object foo2{{ | ||
val x = List(1,2,3) | ||
x match { | ||
case t: List[tt] => t.head.asInstanceOf[tt] | ||
} | ||
}} | ||
|
||
object bar2 {{ | ||
|
||
class C[T <: Seq[_]] | ||
|
||
val x: AnyRef = new C | ||
|
||
x match { | ||
case x: C[u] => | ||
def x: u = x | ||
val s: Seq[_] = x | ||
} | ||
}} | ||
|
||
object foo3{ val x0 = { | ||
val x = List(1,2,3) | ||
x match { | ||
case t: List[tt] => t.head.asInstanceOf[tt] | ||
} | ||
}} | ||
|
||
object bar3 { def f0 = { | ||
|
||
class C[T <: Seq[_]] | ||
|
||
val x: AnyRef = new C | ||
|
||
x match { | ||
case x: C[u] => | ||
def x: u = x | ||
val s: Seq[_] = x | ||
} | ||
}} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is the self-recursive call intended here?
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.
I assume so, it was an old test in pos. The new test in pickling adds more variations that exercise forward binds in pickling.