Skip to content

error: error while loading X, class file './package/X.class' has location not matching its contents: contains trait X #8305

Open
@scabug

Description

@scabug

package.scala

package urgh {
  trait One extends Base {
    def one = 1
  }

  trait Two extends Base {
    def two = true
  }

  trait Base {
    trait Two[A, B] {
      def three(a: A, b: B): A = a
    }
  }
}

package object urgh extends One with Two
$ scalac package.scala

Woo, compilation succeeded. Time to run my awesome program!

$ scala
Welcome to Scala version 2.10.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_45).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import urgh._
error: error while loading Two, class file './urgh/Two.class' has location not matching its contents: contains trait Two

scala>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions