Skip to content
Browse files

replace symbols correctly when subtyping dependent types

as discussed in [1], this change has no impact on the scala type
system, but it can fix subtyping for annotation checkers if the
pluggable type system supports annotations that can refer to method
parameters.

[1] https://groups.google.com/forum/#!topic/scala-internals/kSJLzYkmif0/discussion
  • Loading branch information...
1 parent 01eb6f4 commit 91c9c420b25072d6ff4123b9bd073028f0a3562a @lrytz lrytz committed Jan 8, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/reflect/scala/reflect/internal/Types.scala
View
2 src/reflect/scala/reflect/internal/Types.scala
@@ -6075,7 +6075,7 @@ trait Types extends api.Types { self: SymbolTable =>
(sameLength(params1, params2) &&
mt1.isImplicit == mt2.isImplicit &&
matchingParams(params1, params2, mt1.isJava, mt2.isJava) &&
- isSubType(res1, res2.substSym(params2, params1), depth))
+ isSubType(res1.substSym(params1, params2), res2, depth))
// TODO: if mt1.params.isEmpty, consider NullaryMethodType?
case _ =>
false

0 comments on commit 91c9c42

Please sign in to comment.
Something went wrong with that request. Please try again.