diff options
author | Martin Odersky <odersky@gmail.com> | 2015-07-14 12:38:05 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-09-18 18:05:15 +0200 |
commit | b10b93e6f8bdee650ccbe588db476bd0c8c8819c (patch) | |
tree | 299209d51a19affa0d6f7ab3506cc649e5767336 /src/dotty/tools/dotc/core/TypeErasure.scala | |
parent | 3eb114351520b16028f9fbcd7a2fcdd6c7e0f5c7 (diff) | |
download | dotty-b10b93e6f8bdee650ccbe588db476bd0c8c8819c.tar.gz dotty-b10b93e6f8bdee650ccbe588db476bd0c8c8819c.tar.bz2 dotty-b10b93e6f8bdee650ccbe588db476bd0c8c8819c.zip |
Better diagnostics for failed sigName calls.
It used to be "assertion error: NoType" whenever sigName git
a projection of a missing member. Now we find out about
what type was projected.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeErasure.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeErasure.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/TypeErasure.scala b/src/dotty/tools/dotc/core/TypeErasure.scala index f27b2fd1e..616e222e0 100644 --- a/src/dotty/tools/dotc/core/TypeErasure.scala +++ b/src/dotty/tools/dotc/core/TypeErasure.scala @@ -445,7 +445,11 @@ class TypeErasure(isJava: Boolean, semiEraseVCs: Boolean, isConstructor: Boolean case tp: TypeRef => if (!tp.denot.exists) throw new MissingType(tp.prefix, tp.name) val sym = tp.symbol - if (!sym.isClass) sigName(tp.info) + if (!sym.isClass) { + val info = tp.info + if (!info.exists) assert(false, "undefined: $tp with symbol $sym") + sigName(info) + } else if (isDerivedValueClass(sym)) sigName(eraseDerivedValueClassRef(tp)) else normalizeClass(sym.asClass).fullName.asTypeName case defn.ArrayType(elem) => |