summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-02-10 13:43:30 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-02-12 15:36:31 -0800
commit427b82648422e4118c68f34e81c94deca3755deb (patch)
treeeff3dbe39b6d04feabfc44ba07aa3cada5a7a2ae /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parent7ea7a3b89b2a597f7aa22eefe39e3bae7244882f (diff)
downloadscala-427b82648422e4118c68f34e81c94deca3755deb.tar.gz
scala-427b82648422e4118c68f34e81c94deca3755deb.tar.bz2
scala-427b82648422e4118c68f34e81c94deca3755deb.zip
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.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala2
1 files changed, 2 insertions, 0 deletions
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)
}