Skip to content

Fix #3553: Wrong generic sig. with singleton types #3563

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 1 commit into from
Nov 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ object GenericSignatures {
ps.foreach(boxedSig)
}

def boxedSig(tp: Type): Unit = jsig(tp, primitiveOK = false)
def boxedSig(tp: Type): Unit = jsig(tp.widenDealias, primitiveOK = false)

def boundsSig(bounds: List[Type]): Unit = {
val (isTrait, isClass) = bounds partition (_.typeSymbol.is(Trait))
Expand Down
8 changes: 8 additions & 0 deletions tests/pos/i3553.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class Foo[T <: List[1]](param: List[1]) {
def foo(in: List[1]): List[true] = Nil
def bar[U >: List[1]](in: List['z']): List[1.0e9] = Nil
}
class Bar[T <: 1](param: 1) {
def foo(in: 1): true = true
def bar[U >: 1](in: 'z'): 1.0e9 = 1.0e9
}