diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/names-defaults.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala index 91f72e3e3c..1d737bb0c7 100644 --- a/test/files/run/names-defaults.scala +++ b/test/files/run/names-defaults.scala @@ -229,6 +229,13 @@ object Test extends Application { def transform(s: String, f: String => String = identity _) = f(s) println(transform("my text")) + + // a bug reported on a mailing list: see comment in Typer.typedModuleDef + object TT + class TT(x: Int = 1) + val v = new TT() + + // result type of the default getter is inferred (parameter type mentions type parameter T) def test10[T](x: List[T] = List(1,2)) = x println(test10()) |