Skip to content

Nothing inferred in polymorphic, inlined method  #7798

Closed
@biboudis

Description

@biboudis

minimized code

object Test {
  inline def meth[R <: Int]: R = 3.asInstanceOf[R] // inferred type is Nothing
  def main(args: Array[String]): Unit = {
    val t: Int = meth
  }
}

expectation

It should work as in the normal case.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions