aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-06 11:25:57 +0100
committerMartin Odersky <odersky@gmail.com>2014-03-07 11:12:34 +0100
commitdbd5a4d22b6164b708a87b508d9b9f135b44a3ee (patch)
treef260c0ac27d161aa7eced5edf0906e354256770b /src/dotty/tools/dotc/typer/Typer.scala
parent2669fac03190a4b52b120e07896cf5cd3de208c6 (diff)
downloaddotty-dbd5a4d22b6164b708a87b508d9b9f135b44a3ee.tar.gz
dotty-dbd5a4d22b6164b708a87b508d9b9f135b44a3ee.tar.bz2
dotty-dbd5a4d22b6164b708a87b508d9b9f135b44a3ee.zip
Scond step to typer reorg: Introduce TypeAssigners.
TypeAssigners assign a toplevel type to a node. They are mixed into Typer, and can be accessed from tpd using ctx.typeAssigner.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 12d349ce4..c545641a0 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -48,7 +48,7 @@ object Typer {
}
}
-class Typer extends Namer with Applications with Implicits with Inferencing with Checking {
+class Typer extends Namer with TypeAssigner with Applications with Implicits with Inferencing with Checking {
import Typer._
import tpd.{cpy => _, _}
@@ -413,7 +413,7 @@ class Typer extends Namer with Applications with Implicits with Inferencing with
}
def typedLiteral(tree: untpd.Literal)(implicit ctx: Context) = track("typedLiteral") {
- tpd.typedLiteral(tree)
+ assignType(tree)
}
def typedNew(tree: untpd.New, pt: Type)(implicit ctx: Context) = track("typedNew") {
@@ -425,7 +425,7 @@ class Typer extends Namer with Applications with Implicits with Inferencing with
typed(cpy.Block(tree, clsDef :: Nil, New(Ident(x), Nil)), pt)
case _ =>
val tpt1 = typedType(tree.tpt)
- tpd.typedNew(cpy.New(tree, tpt1))
+ assignType(cpy.New(tree, tpt1))
// todo in a later phase: checkInstantiatable(cls, tpt1.pos)
}
}