Skip to content

failure to infer literal types from literal terms #3782

Closed
@soronpo

Description

@soronpo
  class Foo[T](val value : T) {type Out = T} 
  object Foo {
    def fromXInt[T <: Int with Singleton](i : T): Foo[T] = new Foo[T](i)
  }
  val f1 = Foo.fromXInt(1)
8 |  val f1 = Foo.fromXInt(1)
  |               ^
  |        Type argument Int does not conform to upper bound Int & Singleton

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions