diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-07-24 07:26:27 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-07-24 07:26:27 +0000 |
commit | f4301266d3eb395f0aaab3211eaaeaff898f9961 (patch) | |
tree | 34a02895c8ca98451e9272d13090b56b4e7ae870 /test/files | |
parent | 50b5242ee355b32266b7c061b696ecad8f84332f (diff) | |
download | scala-f4301266d3eb395f0aaab3211eaaeaff898f9961.tar.gz scala-f4301266d3eb395f0aaab3211eaaeaff898f9961.tar.bz2 scala-f4301266d3eb395f0aaab3211eaaeaff898f9961.zip |
fixed a bug with defaults reported on mailing list
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()) |