summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/reflect/internal/pickling/UnPickler.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/scala/reflect/internal/pickling/UnPickler.scala b/src/compiler/scala/reflect/internal/pickling/UnPickler.scala
index 7ea5856f09..00dc04de80 100644
--- a/src/compiler/scala/reflect/internal/pickling/UnPickler.scala
+++ b/src/compiler/scala/reflect/internal/pickling/UnPickler.scala
@@ -834,6 +834,11 @@ abstract class UnPickler /*extends reflect.generic.UnPickler*/ {
def newLazyTypeRef(i: Int): LazyType = new LazyTypeRef(i)
def newLazyTypeRefAndAlias(i: Int, j: Int): LazyType = new LazyTypeRefAndAlias(i, j)
+ /** Convert to a type error, that is printed gracefully instead of crashing.
+ *
+ * Similar in intent to what SymbolLoader does (but here we don't have access to
+ * error reporting, so we rely on the typechecker to report the error).
+ */
def toTypeError(e: MissingRequirementError) =
new TypeError(e.msg)