Skip to content

Type member widened to Any when passed out of inline method #10343

@LPTK

Description

@LPTK

Minimized code

class C {
  type A
  inline def test: A = ???
}
@main def m = {
  val c = C()
  val x: c.A = c.test
}

Output

Found:    Any
Required: c.A

https://scastie.scala-lang.org/dB277yJnSs6qID8kkxvZxA

Expectation

Compiles.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions