From a99579a2b36d6e9120bae4d11d57d2c1457a9c1d Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Fri, 16 Mar 2012 10:05:49 +0100 Subject: Remove assert given the test. Fixes #SI-5572. --- test/files/neg/t5572.check | 11 +++++++++++ test/files/neg/t5572.scala | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 test/files/neg/t5572.check create mode 100644 test/files/neg/t5572.scala (limited to 'test/files/neg') diff --git a/test/files/neg/t5572.check b/test/files/neg/t5572.check new file mode 100644 index 0000000000..7b1e290861 --- /dev/null +++ b/test/files/neg/t5572.check @@ -0,0 +1,11 @@ +t5572.scala:16: error: type mismatch; + found : B + required: A + Z.transf(a, b) match { + ^ +t5572.scala:18: error: type mismatch; + found : A + required: B + run(sth, b) + ^ +two errors found diff --git a/test/files/neg/t5572.scala b/test/files/neg/t5572.scala new file mode 100644 index 0000000000..2da1209c61 --- /dev/null +++ b/test/files/neg/t5572.scala @@ -0,0 +1,23 @@ +class A +class B + +trait X + +object Z { + def transf(a: A, b: B): X = null +} + +class Test { + + def bar(): (A, B) + + def foo { + val (b, a) = bar() + Z.transf(a, b) match { + case sth => + run(sth, b) + } + } + + def run(x: X, z: B): Unit = () +} -- cgit v1.2.3