Permalink
Browse files

better error when typetagging local classes

  • Loading branch information...
1 parent 3b68b45 commit 1bdd5ee07d8ec4374b848099c9a95f27c2e9b381 @xeno-by xeno-by committed Nov 12, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/compiler/scala/reflect/reify/Errors.scala
  2. +1 −1 test/files/neg/t6323a.check
@@ -28,7 +28,7 @@ trait Errors {
}
def CannotReifyWeakType(details: Any) = {
- val msg = "cannot create a TypeTag" + details
+ val msg = "cannot create a TypeTag" + details + ": use WeakTypeTag instead"
throw new ReificationException(defaultErrorPosition, msg)
}
@@ -1,6 +1,6 @@
t6323a.scala:11: `package`.this.materializeTypeTag[Test](scala.reflect.runtime.`package`.universe) is not a valid implicit value for reflect.runtime.universe.TypeTag[Test] because:
failed to typecheck the materialized tag:
-cannot create a TypeTag referring to local class Test.Test
+cannot create a TypeTag referring to local class Test.Test: use WeakTypeTag instead
val value = u.typeOf[Test]
^
t6323a.scala:11: error: No TypeTag available for Test

0 comments on commit 1bdd5ee

Please sign in to comment.