Created
June 26, 2017 23:40
-
-
Save SethTisue/f574b3235c6e13d211ff91e6cb0c242e to your computer and use it in GitHub Desktop.
is this scala/bug#7234 or something else?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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