miniboxing-plugin
miniboxing-plugin copied to clipboard
Inner classes type param warnings: only when type params are there
$ cat inner.scala
class C[@miniboxed T] {
// should warn, since E contains refs to T:
class E(t: T)
// should not warn, since F does not have them:
class F
}
$ mb-scalac inner.scala
inner.scala:3: warning: The class E will not be miniboxed based on type parameter(s) T of miniboxed class C. To have it specialized, add the type parameters of class C, marked with "@miniboxed" to the definition of class E and instantiate it explicitly passing the type parameters from class C:
class E(t: T)
^
inner.scala:6: warning: The class F will not be miniboxed based on type parameter(s) T of miniboxed class C. To have it specialized, add the type parameters of class C, marked with "@miniboxed" to the definition of class F and instantiate it explicitly passing the type parameters from class C:
class F
^
two warnings found