KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
From the REPL: scala> final val x = "x" x: java.lang.String("x") = x scala> @javax.persistence.Table(name = x) case class foo() defined class foo scala> final val x:java.lang.String = "x" x: java.lang.String = x scala> @javax.persistence.Table(name = x) case class foo() <console>:6: error: annotation argument needs to be a constant; found: x @javax.persistence.Table(name = x) case class foo() Can someone explain why this only works without a type?
Tags (comma-separated)
Save Edits
Cancel