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

mixin method overrides final method with variation on the reflect.{api,internal} pattern of abstract types implemented by a class #8592

Open
scabug opened this issue May 15, 2014 · 4 comments
Labels
Milestone

Comments

@scabug
Copy link

scabug commented May 15, 2014

package api {
  class Trees {
    type Symbol <: SymbolApi

    trait SymbolApi

    trait TreeApi {
      def symbol: SymbolApi
    }

    trait SymTreeApi extends TreeApi {
      def symbol: Symbol
    }
  }
}

package internal {
  class Trees extends api.Trees {
    class Symbol extends SymbolApi
    abstract class Tree extends TreeApi {
       final def symbol: Symbol = null
    }
    class SymTree extends Tree with SymTreeApi
  }
}

object Test extends App {
  val u = new internal.Trees {}
  new u.SymTree() // java.lang.VerifyError: class internal.Trees$SymTree overrides final method symbol.()Lapi/Trees$SymbolApi;
}

@scabug
Copy link
Author

scabug commented May 15, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8592?orig=1
Reporter: @retronym
Affected Versions: 2.11.0

@scabug
Copy link
Author

scabug commented May 16, 2014

@paulp said:
Previously reported as #6544, but I had no self-contained reproduction.

@scabug
Copy link
Author

scabug commented May 16, 2014

@retronym said:
"self contained reproduction" are my middle names!

@scabug
Copy link
Author

scabug commented May 16, 2014

@retronym said:
Hah, you were trying exactly the same patch, too!

@scabug scabug added the mixin label Apr 7, 2017
@scabug scabug added this to the Backlog milestone Apr 7, 2017
@adriaanm adriaanm removed their assignment Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants