From b2117cf6f4080eff9028b2aa33a013329022efd6 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Thu, 31 Jan 2013 10:18:26 -0800 Subject: SI-6941 tests tests that the methods' bytecodes are similar as variable load/stores are reordered, it ignores which variables are modified when checking for bytecode equality the assert is: `similarBytecode(methNodeA, methNodeB, equalsModuloVar)` --- test/files/jvm/t6941/Analyzed_1.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/files/jvm/t6941/Analyzed_1.scala (limited to 'test/files/jvm/t6941/Analyzed_1.scala') diff --git a/test/files/jvm/t6941/Analyzed_1.scala b/test/files/jvm/t6941/Analyzed_1.scala new file mode 100644 index 0000000000..549abd5e64 --- /dev/null +++ b/test/files/jvm/t6941/Analyzed_1.scala @@ -0,0 +1,11 @@ +// this class's bytecode, compiled under -optimize is analyzed by the test +// method a's bytecode should be identical to method b's bytecode +class SameBytecode { + def a(xs: List[Int]) = xs match { + case x :: _ => x + } + + def b(xs: List[Int]) = xs match { + case xs: ::[Int] => xs.hd$1 + } +} \ No newline at end of file -- cgit v1.2.3