diff options
author | Paul Phillips <paulp@improving.org> | 2011-12-30 23:02:44 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-12-31 07:01:12 -0800 |
commit | 008a781f49feb567833e9347ff9d293defeafe6d (patch) | |
tree | 26efcae8f28c0af70c236840e87de796ebe4b838 /test/files/run | |
parent | 82c793a438c7bd802daf96c8b2012f54fbd737ba (diff) | |
download | scala-008a781f49feb567833e9347ff9d293defeafe6d.tar.gz scala-008a781f49feb567833e9347ff9d293defeafe6d.tar.bz2 scala-008a781f49feb567833e9347ff9d293defeafe6d.zip |
More uniformity for the parser.
Fixing consecutive type application made it more obvious there was
another missing bit of the parser, type application following function
application. This should (and now does) work:
object F { def apply[T] = List[T]() }
def g() = F
g()[String]
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/type-currying.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/run/type-currying.scala b/test/files/run/type-currying.scala index 717e0763a3..f9764c64f0 100644 --- a/test/files/run/type-currying.scala +++ b/test/files/run/type-currying.scala @@ -43,3 +43,16 @@ object Test { assert(n0 == n1) } } + +class A { + object Foo { + def apply[T] = Bar + } + object Bar { + def apply() = Foo + } + + def f() = Foo + def g = f()[Int]()[String]() + def h = Foo[Foo.type]()[Foo.type]() +} |