Skip to content

tasty error when declaring subclass field type and overriding (thrown when publishing) #12834

Closed
@hughsimpson

Description

@hughsimpson

Compiler version

3.0.0

Minimized code

class A(val ref: Option[B]) {}
class B(override val ref: Option[B]) extends A(ref = ref) {}

Output

runs fine, but when publishing with sbt publishLocal throws

[error] 8 |class B(override val ref: Option[B]) extends A(ref = ref) {}
[error]   |                                             ^^^^^^^^^^^
[error]   |undefined: new bug.A # -1: TermRef(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),object bug),A),<init>) at readTasty

Expectation

This should be fine (is a regression from scala 2)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions