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/compiler/scala/reflect/reify/package.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/compiler/scala/reflect/reify/package.scala')
-rw-r--r-- | src/compiler/scala/reflect/reify/package.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/reflect/reify/package.scala b/src/compiler/scala/reflect/reify/package.scala index 7be57c0cb7..78f85c2634 100644 --- a/src/compiler/scala/reflect/reify/package.scala +++ b/src/compiler/scala/reflect/reify/package.scala @@ -56,7 +56,7 @@ package object reify { if (concrete) throw new ReificationException(enclosingMacroPosition, "tpe %s is an unresolved spliceable type".format(tpe)) } - tpe.normalize match { + tpe.dealiasWiden match { case TypeRef(_, ArrayClass, componentTpe :: Nil) => val componentErasure = reifyRuntimeClass(global)(typer0, componentTpe, concrete) gen.mkMethodCall(arrayClassMethod, List(componentErasure)) |