diff options
author | Paul Phillips <paulp@improving.org> | 2012-07-28 20:02:02 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-07-28 20:02:02 -0700 |
commit | 4db27fc4676995c422c0964e27d305f0264e1389 (patch) | |
tree | 61232183ec73158a6f530fefa5e480bb9cc644b6 /src | |
parent | 5988121127ec17e4cc76dd49bc7847fc56a08336 (diff) | |
parent | ae28472bc727b25040da4b1428fcb14137d01102 (diff) | |
download | scala-4db27fc4676995c422c0964e27d305f0264e1389.tar.gz scala-4db27fc4676995c422c0964e27d305f0264e1389.tar.bz2 scala-4db27fc4676995c422c0964e27d305f0264e1389.zip |
Merge pull request #991 from adriaanm/ticket-5958
SI-5958 This deserves a stable type
Diffstat (limited to 'src')
-rw-r--r-- | src/reflect/scala/reflect/internal/TreeGen.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/TreeGen.scala b/src/reflect/scala/reflect/internal/TreeGen.scala index c3a6fce164..285700f9ff 100644 --- a/src/reflect/scala/reflect/internal/TreeGen.scala +++ b/src/reflect/scala/reflect/internal/TreeGen.scala @@ -143,6 +143,8 @@ abstract class TreeGen extends makro.TreeBuilder { /** Computes stable type for a tree if possible */ def stableTypeFor(tree: Tree): Option[Type] = tree match { + case This(_) if tree.symbol != null && !tree.symbol.isError => + Some(ThisType(tree.symbol)) case Ident(_) if tree.symbol.isStable => Some(singleType(tree.symbol.owner.thisType, tree.symbol)) case Select(qual, _) if ((tree.symbol ne null) && (qual.tpe ne null)) && // turned assert into guard for #4064 |