aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-09-25 15:02:59 +0200
committerMartin Odersky <odersky@gmail.com>2013-09-25 15:02:59 +0200
commitb7f5aa30383730dc1d2b34f9773695d0f5669bcd (patch)
tree2e3dc8e18a09c1f7ca271c4f282be972aeab34fd /src/dotty/tools/dotc/typer/Namer.scala
parent50a84e0e900fd5a67a4701fd2730a0c0bf66b834 (diff)
downloaddotty-b7f5aa30383730dc1d2b34f9773695d0f5669bcd.tar.gz
dotty-b7f5aa30383730dc1d2b34f9773695d0f5669bcd.tar.bz2
dotty-b7f5aa30383730dc1d2b34f9773695d0f5669bcd.zip
Sereval more bugfixes to typer and type handling.
Several of these avoided stackoverflows/cyclic references
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index ca284edf7..a803903bb 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -368,14 +368,16 @@ class Namer { typer: Typer =>
val site = sym.owner.thisType
val inherited = {
// TODO: Look only at member of supertype instead?
- ((NoType: Type) /: sym.owner.info.baseClasses.tail) { (tp, cls) =>
- val itpe = cls.info
- .nonPrivateDecl(sym.name)
- .matchingDenotation(site, schema)
- .asSeenFrom(site)
- .info.finalResultType
- tp & itpe
- }
+ if (sym.owner.isTerm) NoType
+ else
+ ((NoType: Type) /: sym.owner.info.baseClasses.tail) { (tp, cls) =>
+ val itpe = cls.info
+ .nonPrivateDecl(sym.name)
+ .matchingDenotation(site, schema)
+ .asSeenFrom(site)
+ .info.finalResultType
+ tp & itpe
+ }
}
inherited orElse typedAheadExpr(mdef.rhs).tpe.widen
}