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