aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-08-23 23:09:53 +0200
committerMartin Odersky <odersky@gmail.com>2015-08-23 23:10:01 +0200
commit5b454b1070c3018203263f3bda21db217ed84f3f (patch)
treeb78860de7d685397273922979f8c256f830b353d /src/dotty/tools/dotc/core/Types.scala
parent5710272caea25014ac36517543a85f07c5f801d1 (diff)
downloaddotty-5b454b1070c3018203263f3bda21db217ed84f3f.tar.gz
dotty-5b454b1070c3018203263f3bda21db217ed84f3f.tar.bz2
dotty-5b454b1070c3018203263f3bda21db217ed84f3f.zip
Make literalize work for TermRefs of constant type.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 0e9f5d9b2..5fd3b81d0 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -94,9 +94,8 @@ object Types {
/** Does this type denote a stable reference (i.e. singleton type)? */
final def isStable(implicit ctx: Context): Boolean = stripTypeVar match {
case tp: TermRef => tp.termSymbol.isStable && tp.prefix.isStable
- case _: SingletonType => true
+ case _: SingletonType | NoPrefix => true
case tp: RefinedType => tp.parent.isStable
- case NoPrefix => true
case _ => false
}