Skip to content

Instantly share code, notes, and snippets.

@SethTisue SethTisue/7234.txt
Created Jun 26, 2017

What would you like to do?
is this scala/bug#7234 or something else?
scala> trait T; class C[T2 <: T](val t: T2, b: Boolean = true, n: Int = 0)
defined trait T
defined class C
scala> val t = new T { }
t: T = $anon$1@f2a1813
scala> new C[t.type](t)
res0: C[<refinement>.type] = C@7645f03e
scala> new C[t.type](t, n = 1)
<console>:15: error: type mismatch;
found : T
required: <refinement>.type
Error occurred in an application involving default arguments.
new C[t.type](t, n = 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.