diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-31 12:50:56 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-31 12:51:06 +0100 |
commit | a3fe0c6b63b7c2019c80546f100693b261bb2f34 (patch) | |
tree | c469bcdbad8f4254e6bf0dbf3332418f19e4c78c /tests/pos/typers.scala | |
parent | e56b26b55de6459ae74ff86e2a62dd2d00436ab2 (diff) | |
download | dotty-a3fe0c6b63b7c2019c80546f100693b261bb2f34.tar.gz dotty-a3fe0c6b63b7c2019c80546f100693b261bb2f34.tar.bz2 dotty-a3fe0c6b63b7c2019c80546f100693b261bb2f34.zip |
Adding a prototype of the right-hand side of default-getters.
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) |