diff options
author | Martin Odersky <odersky@gmail.com> | 2014-10-07 12:24:15 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-10-12 10:50:35 +0200 |
commit | c72d404dd12309219d312a5730bed82175840db5 (patch) | |
tree | 345c6f427359217af395feccf60c010955f76b79 | |
parent | 88007462d3251cdc3032c724dde873eabfed6427 (diff) | |
download | dotty-c72d404dd12309219d312a5730bed82175840db5.tar.gz dotty-c72d404dd12309219d312a5730bed82175840db5.tar.bz2 dotty-c72d404dd12309219d312a5730bed82175840db5.zip |
Replace typed with typedUnadapted.
1) Avoids unneccessary second adapt.
2) Avoids error when used in TreeChecking when we try to compare
types in previous tree and new tree - if we used `typed`, the
previous tree would not have a type!
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 46fd17d15..80eb5965c 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -394,7 +394,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit val setterTypeRaw = pre select (setterName, setter) val setterType = ensureAccessible(setterTypeRaw, isSuperSelection(lhsCore), tree.pos) val lhs2 = untpd.rename(lhsCore, setterName).withType(setterType) - typed(cpy.Apply(tree)(untpd.TypedSplice(lhs2), tree.rhs :: Nil)) + typedUnadapted(cpy.Apply(tree)(untpd.TypedSplice(lhs2), tree.rhs :: Nil)) case _ => reassignmentToVal } |