diff options
Diffstat (limited to 'tests/pos/typers.scala')
-rw-r--r-- | tests/pos/typers.scala | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/pos/typers.scala b/tests/pos/typers.scala index dd08bab07..d7b7989c7 100644 --- a/tests/pos/typers.scala +++ b/tests/pos/typers.scala @@ -4,10 +4,19 @@ import annotation.{tailrec, switch} object typers { - def fun(x: Int): Int = x + 1 + object Eta { + + def fun(x: Int): Int = x + 1 + val foo = fun(_) + } + + case class DefaultParams(init: String => String = identity) + object DefaultParams { + def foo(x: String => String = identity) = x("abc") + + foo() + } - val foo = fun(_) - class List[+T] { def :: (x: T) = new :: (x, this) |