Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inner classes type param warnings: only when type params are there #244

Open
VladUreche opened this issue Nov 12, 2015 · 0 comments
Open
Assignees
Milestone

Comments

@VladUreche
Copy link
Member

$ 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

@VladUreche VladUreche added this to the 0.4 milestone Nov 12, 2015
@VladUreche VladUreche self-assigned this Nov 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant