diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-01 18:42:45 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-01 18:44:37 +0100 |
commit | bddeaecb8f69032c5117e926ef67afc0deedd0dd (patch) | |
tree | ea8a2d929e3d68e7385ea140ab0f8d3143d7932a /src/dotty/tools/dotc/typer/Typer.scala | |
parent | c2127130f5b1534d49d2ec07b9bd4f83bffe9d0a (diff) | |
download | dotty-bddeaecb8f69032c5117e926ef67afc0deedd0dd.tar.gz dotty-bddeaecb8f69032c5117e926ef67afc0deedd0dd.tar.bz2 dotty-bddeaecb8f69032c5117e926ef67afc0deedd0dd.zip |
Tweaks to applications, operator assignments, and variable definitions.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index f0d4d7493..c39007a9e 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -420,6 +420,10 @@ class Typer extends Namer with Applications with Implicits { tree.lhs match { case lhs @ Apply(fn, args) => typed(cpy.Apply(lhs, untpd.Select(fn, nme.update), args :+ tree.rhs), pt) + case untpd.TypedSplice(Apply(Select(lhs, app), args)) if app == nme.apply => + typed(cpy.Apply(lhs, + untpd.Select(untpd.TypedSplice(lhs), nme.update), + (args map untpd.TypedSplice) :+ tree.rhs), pt) case lhs => val lhs1 = typed(lhs) def reassignmentToVal = @@ -620,7 +624,7 @@ class Typer extends Namer with Applications with Implicits { assert(isFullyDefined(pt, ForceDegree.none)) (EmptyTree, pt) case original: ValDef => - val meth = symbolOfTree(original) + val meth = original.symbol // ??? was: symbolOfTree(original) TODO: come back to this assert(meth.exists, meth) (EmptyTree, meth.info) case original => @@ -819,7 +823,8 @@ class Typer extends Namer with Applications with Implicits { } def typedUnnamed(tree: untpd.Tree): Tree = tree match { - case tree: untpd.Apply => typedApply(tree, pt) + case tree: untpd.Apply => + if (ctx.mode is Mode.Pattern) typedUnApply(tree, pt) else typedApply(tree, pt) case tree: untpd.This => typedThis(tree) case tree: untpd.Literal => typedLiteral(tree) case tree: untpd.New => typedNew(tree, pt) |