diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-03-09 15:30:05 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-03-09 18:57:22 +0100 |
commit | 83c9c764b528a7a1c1d39c480d22c8e3a71d5a58 (patch) | |
tree | 484277f12fd7aefd287e6ca2dd39441ca5adbac2 /test/files/pos/t7234.scala | |
parent | 889020dfab9f99a3198528fedb699c061027acab (diff) | |
download | scala-83c9c764b528a7a1c1d39c480d22c8e3a71d5a58.tar.gz scala-83c9c764b528a7a1c1d39c480d22c8e3a71d5a58.tar.bz2 scala-83c9c764b528a7a1c1d39c480d22c8e3a71d5a58.zip |
SI-7234 Make named args play nice with dep. method types
Some care is needed to avoid interaction with constant
types (e.g pos/z1730.scala) and with existentials
(e.g. t3507-old.scala).
Diffstat (limited to 'test/files/pos/t7234.scala')
-rw-r--r-- | test/files/pos/t7234.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/pos/t7234.scala b/test/files/pos/t7234.scala new file mode 100644 index 0000000000..59a233d835 --- /dev/null +++ b/test/files/pos/t7234.scala @@ -0,0 +1,15 @@ +trait Main { + trait A { + type B + } + trait C { + def c(a: A, x: Int = 0)(b: a.B) + } + def c: C + def d(a: A, x: Int = 0)(b: a.B) + + def ok1(a: A)(b: a.B) = c.c(a, 42)(b) + def ok2(a: A)(b: a.B) = d(a)(b) + + def fail(a: A)(b: a.B) = c.c(a)(b) +} |