You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Classes defined in the REPL are missing ScalaSig annotation.
=== What steps will reproduce the problem? ===
In 2.8.1 REPL:
Welcome to Scala version 2.8.1.final (JavaHotSpot(TM) 64-BitServerVM, Java1.6.0_24).
scala>caseclassFoo(x: String)
defined classFoo
scala>valclazz=classOf[Foo]
clazz: java.lang.Class[Foo] =classFoo
scala> clazz.getAnnotations
res1: Array[java.lang.annotation.Annotation] =Array()
In 2.9.0.RC4 REPL:
Welcome to Scala version 2.9.0.RC4 (JavaHotSpot(TM) 64-BitServerVM, Java1.6.0_24).
scala>caseclassFoo(x: String)
defined classFoo
scala>valclazz=classOf[Foo]
clazz: java.lang.Class[Foo] =classFoo
scala> clazz.getAnnotations
res0: Array[java.lang.annotation.Annotation] =Array()
=== What is the expected behavior? ===
Compare with this example, running sbt console in the Salat project
looking at one of the Salat test model classes, which has of course
a .class file but also a ScalaSig annotation:
scala>importcom.novus.salat.test.model._importcom.novus.salat.test.model._
scala>valclazz=classOf[Hector]
x: java.lang.Class[com.novus.salat.test.model.Hector] =class
com.novus.salat.test.model.Hector
scala> clazz.getAnnotations
res2: Array[java.lang.annotation.Annotation] =!A/Z:u s9 "A tC2,GN calaSignature(bytes= c C Q GO // etc etc etc
=== What do you see instead? ===
I expect that defining a class in the REPL should create a class with a ScalaSig annotation.
Failing that, extending ScalaSigParser to be able to manually derive a ScalaSig annotation on a class defined in the REPL (or anywhere) would be extremely useful.
@paulp said:
Based on iulian's input on the mailing list I am reclassifying as enhancement, since the signature is not missing. But it is not ideally located.
Classes defined in the REPL are missing ScalaSig annotation.
=== What steps will reproduce the problem? ===
In 2.8.1 REPL:
In 2.9.0.RC4 REPL:
=== What is the expected behavior? ===
Compare with this example, running sbt console in the Salat project
looking at one of the Salat test model classes, which has of course
a .class file but also a ScalaSig annotation:
=== What do you see instead? ===
I expect that defining a class in the REPL should create a class with a ScalaSig annotation.
Failing that, extending ScalaSigParser to be able to manually derive a ScalaSig annotation on a class defined in the REPL (or anywhere) would be extremely useful.
=== Additional information ===
http://groups.google.com/group/scala-user/browse_thread/thread/484ed3e719f13fdf
=== What versions of the following are you using? ===
The text was updated successfully, but these errors were encountered: