Scala compiler throws annotation argument needs to be a constant error on constant argument -


i'm using following annotation parameter shipped spark-sql:

@sqluserdefinedtype(udt = actionudt.clazz) trait action extends actionlike { ...implementation } 

where actionudt.clazz defined constant val:

object actionudt extends actionudt {   final val clazz: class[_ <: actionudt] = this.getclass } 

but got following compiler error:

error:(25, 37) annotation argument needs constant; found: actionudt.clazz @sqluserdefinedtype(udt = actionudt.clazz)                                     ^ 

why produce such false alarm? bug? i'm using scala 2.10.5

a class not constant object defined here. constant .. .. constant in numeric or string literal.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -