From 91c9c420b25072d6ff4123b9bd073028f0a3562a Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 8 Jan 2013 10:05:55 +0100 Subject: 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 --- src/reflect/scala/reflect/internal/Types.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala index 3136b227db..55873f6c2f 100644 --- a/src/reflect/scala/reflect/internal/Types.scala +++ b/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 -- cgit v1.2.3