diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-03-24 12:27:05 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-03-24 12:27:05 +0100 |
commit | 4783a25d3068c2f756b8517b69a95b5d77d24654 (patch) | |
tree | 299eff9687e4b26885a9b4ea655979b7a699dcf4 /src/compiler | |
parent | a280ce61fbff0f1e8e3f1c3179833db9927ff0e3 (diff) | |
parent | 3d9d1f6c99d2ee803402b02cccba72086af74b38 (diff) | |
download | scala-4783a25d3068c2f756b8517b69a95b5d77d24654.tar.gz scala-4783a25d3068c2f756b8517b69a95b5d77d24654.tar.bz2 scala-4783a25d3068c2f756b8517b69a95b5d77d24654.zip |
Merge pull request #4396 from retronym/ticket/9074-2.12
SI-9074 Fix generic substitution with package objects, overloading
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 7 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index b3e207b334..98289f6a3c 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -810,12 +810,7 @@ trait Contexts { self: Analyzer => val qual = imp.qual val qualSym = qual.tpe.typeSymbol - val pre = - if (qualSym.isPackageClass) - // SI-6225 important if the imported symbol is inherited by the the package object. - qualSym.packageObject.typeOfThis - else - qual.tpe + val pre = qual.tpe def collect(sels: List[ImportSelector]): List[ImplicitInfo] = sels match { case List() => List() diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index cf97474d9a..b9ccf0977c 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -1447,7 +1447,7 @@ trait Infer extends Checkable { log(s"Attaching AntiPolyType-carrying overloaded type to $sym") // Multiple alternatives which are within bounds; spin up an // overloaded type which carries an "AntiPolyType" as a prefix. - val tparams = newAsSeenFromMap(pre, hd.owner) mapOver hd.typeParams + val tparams = new AsSeenFromMap(pre, hd.owner) mapOver hd.typeParams val bounds = tparams map (_.tpeHK) // see e.g., #1236 val tpe = PolyType(tparams, OverloadedType(AntiPolyType(pre, bounds), alts)) finish(sym setInfo tpe, tpe) |