class StringSingletonList[T <: Singleton with String](values: List[T])
new StringSingletonList(List("a", "a"))
// inferred type arguments [String] do not conform to class StringSingletonList's type parameter bounds [T <: Singleton with String]
Strangely, the argument's type is inferred correctly:
The following example yields a type mismatch:
Strangely, the argument's type is inferred correctly:
These two declarations can be used as a workaround: