diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-11-06 18:18:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-06 18:18:59 +0100 |
commit | 4f675c39bcb13dcbfc8868c33f10dbbb9922c08c (patch) | |
tree | 7963e1340138cafded32cd5cdb6db4ded1090f94 /tests | |
parent | 913f76a482efc733c01dd262a72de78e795d4b7b (diff) | |
parent | ed3f586c8cd8bfcc31f1e0462a5294182b043103 (diff) | |
download | dotty-4f675c39bcb13dcbfc8868c33f10dbbb9922c08c.tar.gz dotty-4f675c39bcb13dcbfc8868c33f10dbbb9922c08c.tar.bz2 dotty-4f675c39bcb13dcbfc8868c33f10dbbb9922c08c.zip |
Merge pull request #1659 from dotty-staging/fix-#1640
Fix #1640: Avoid applications with untyped function parts
Diffstat (limited to 'tests')
-rw-r--r-- | tests/neg/i1640.scala | 4 | ||||
-rw-r--r-- | tests/neg/i1641.scala | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/neg/i1640.scala b/tests/neg/i1640.scala new file mode 100644 index 000000000..78351a1d6 --- /dev/null +++ b/tests/neg/i1640.scala @@ -0,0 +1,4 @@ +object Test extends App { + List(1, 2, 3) map (_ match { case x => x + 1 }) + List((1, 2)) x (_ match { case (x, z) => x + z }) // error +} diff --git a/tests/neg/i1641.scala b/tests/neg/i1641.scala new file mode 100644 index 000000000..db1daf791 --- /dev/null +++ b/tests/neg/i1641.scala @@ -0,0 +1,8 @@ +package bar { object bippy extends (Double => String) { def apply(x: Double): String = "Double" } } +package object println { def bippy(x: Int, y: Int, z: Int) = "(Int, Int, Int)" } +object Test { + def main(args: Array[String]): Unit = { + println(bar.bippy(5.5)) + println(bar.bippy(1, 2, 3)) // error + } +} |