Skip to content

The reference ambiguous checking is too broad in dotty 0.24  #8930

Closed
@esse-byte

Description

@esse-byte

Minimized code

class A(val i: Int)

def a(i: Int): A = new A(i) { println(i) }

Output

Reference to i is ambiguous,
it is both defined in method a
and inherited subsequently in anonymous class A {...}

Expectation

The code compiles in both dotty 0.23 and scala 2.3.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions