From 427b82648422e4118c68f34e81c94deca3755deb Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Mon, 10 Feb 2014 13:43:30 -0800 Subject: SI-8177 refine embeddedSymbols We look for any prefix that has a refinement class for a type symbol. This includes ThisTypes, which were not considered before. pos/t8177g.scala, neg/t0764*scala now compile, as they should Additional test cases contributed by Jason & Paul. --- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala') diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 2b5eed7102..02dd63f011 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -470,6 +470,8 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans // Important: first check the pair has the same kind, since the substitution // carries high's type parameter's bounds over to low, so that // type equality doesn't consider potentially different bounds on low/high's type params. + // In b781e25afe this went from using memberInfo to memberType (now lowType/highType), tested by neg/override.scala. + // TODO: was that the right fix? it seems type alias's RHS should be checked by looking at the symbol's info if (pair.sameKind && lowType.substSym(low.typeParams, high.typeParams) =:= highType) () else overrideTypeError() // (1.6) } -- cgit v1.2.3