diff options
author | Paul Phillips <paulp@improving.org> | 2013-01-29 13:16:23 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-29 13:24:40 -0800 |
commit | 039b1cb1a5b8738bb3731035838d2fcaeb317d07 (patch) | |
tree | dc623fd163c0789431b4bf2ec0f8551c88f58acb /src/reflect/scala/reflect/internal/TreeGen.scala | |
parent | 0388a7cdb111f0dd6b86bc838ffe51de3df28b4c (diff) | |
download | scala-039b1cb1a5b8738bb3731035838d2fcaeb317d07.tar.gz scala-039b1cb1a5b8738bb3731035838d2fcaeb317d07.tar.bz2 scala-039b1cb1a5b8738bb3731035838d2fcaeb317d07.zip |
Changes many calls to normalize to dealiasWiden.
Calling normalize is very aggressive and is usually the wrong
thing. It is one of the leading contributors to non-determinism
in compiler outcomes (often of the form "I gave a debugging or
logging compiler option and it started/stopped working") and
should be used only in very specific circumstances.
Almost without exception, dealiasWiden is what you want; not
widen, not normalize. If possible I will remove normalize from
Type entirely, making it private to those areas of the compiler
which actually require it.
Diffstat (limited to 'src/reflect/scala/reflect/internal/TreeGen.scala')
-rw-r--r-- | src/reflect/scala/reflect/internal/TreeGen.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/TreeGen.scala b/src/reflect/scala/reflect/internal/TreeGen.scala index 54a85dee86..b2269e476f 100644 --- a/src/reflect/scala/reflect/internal/TreeGen.scala +++ b/src/reflect/scala/reflect/internal/TreeGen.scala @@ -212,7 +212,7 @@ abstract class TreeGen extends macros.TreeBuilder { mkTypeApply(mkAttributedSelect(target, method), targs map TypeTree) private def mkSingleTypeApply(value: Tree, tpe: Type, what: Symbol, wrapInApply: Boolean) = { - val tapp = mkAttributedTypeApply(value, what, tpe.normalize :: Nil) + val tapp = mkAttributedTypeApply(value, what, tpe.dealias :: Nil) if (wrapInApply) Apply(tapp, Nil) else tapp } private def typeTestSymbol(any: Boolean) = if (any) Any_isInstanceOf else Object_isInstanceOf |