-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Handle AntiPolyType in Symbol.alternatives #10832
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
base: 2.13.x
Are you sure you want to change the base?
Conversation
cannot be applied to (Int) | ||
def f = A.a[Int][String](0) | ||
^ | ||
1 error |
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.
Did not attempt to compete with dotty.
8 | def f = A.a[Int][String](0)
| ^^^
| None of the overloaded alternatives of method a in object A with types
| [F](x: String): Int
| [F](x: Int): Int
| match type arguments [Int] and type arguments [String] and arguments ((0 : Int))
|
| where: F is a type variable
26ff2ce
to
175256b
Compare
@@ -4162,6 +4161,8 @@ trait Types | |||
case TypeRef(pre, sym, Nil) => copyTypeRef(tycon, pre, sym, args) | |||
case TypeRef(pre, sym, bogons) => devWarning(s"Dropping $bogons from $tycon in appliedType.") ; copyTypeRef(tycon, pre, sym, args) | |||
case PolyType(tparams, restpe) => restpe.instantiateTypeParams(tparams, args) | |||
case MethodType(params, resultType) => resultType | |||
case NullaryMethodType(resultType) => resultType |
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.
Does this happen with erroneous trees? Could you add a comment, maybe a devWarning
like above?
@@ -2936,8 +2936,7 @@ trait Types | |||
|
|||
object MethodType extends MethodTypeExtractor | |||
|
|||
// TODO: rename so it's more appropriate for the type that is for a method without argument lists | |||
// ("nullary" erroneously implies it has an argument list with zero arguments, it actually has zero argument lists) | |||
// Nullary not nilary, i.e., parameterlistless not merely parameterless |
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.
ah this is where I fixed the comment
Fixes scala/bug#10628