Skip to content

outer class inaccessible during initialization of inner class in Scala 2.13.0 #11736

Closed
scala/scala
#8431
@joschua-fink

Description

@joschua-fink
trait Foo {
  trait Bar {
    println(Foo.this)
  }
}

abstract class Foo1 extends Foo

object Foo2 extends Foo1 {
  new Bar {}
}

Foo2

In Scala 2.13.0 the example above unexpectely prints null. Making Foo1 a trait or Foo2 something else than an object solves the issue. The example works as expected in Scala 2.12.10.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions