Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

better error when typetagging local classes
  • Loading branch information...
commit 1a6c8597109a9eee122d01c142d8955a14f704c8 2 parents 6ae0e8f + 1bdd5ee
@xeno-by xeno-by authored
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.
Something went wrong with that request. Please try again.