Skip to content

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

@scabug

Description

@scabug
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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions