Permalink
Browse files

Merge pull request #1610 from scalamacros/topic/typetags-local-classes

better error when typetagging local classes
  • Loading branch information...
2 parents 6ae0e8f + 1bdd5ee commit 1a6c8597109a9eee122d01c142d8955a14f704c8 @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
View
2 src/compiler/scala/reflect/reify/Errors.scala
@@ -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)
}
View
2 test/files/neg/t6323a.check
@@ -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 1a6c859

Please sign in to comment.