From 2fefb37220f82300e2aa44442f1a42261d65e359 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 3 Oct 2010 03:19:21 +0000 Subject: One last batch of test cleanups and I think I'l... One last batch of test cleanups and I think I'll call it a day. If you're worried I didn't leave any for anyone else, let me put your fears to rest. PLENTY left to sift through. No review. --- test/pending/neg/bug963.scala | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/pending/neg/bug963.scala (limited to 'test/pending/neg/bug963.scala') diff --git a/test/pending/neg/bug963.scala b/test/pending/neg/bug963.scala new file mode 100644 index 0000000000..430ef090e4 --- /dev/null +++ b/test/pending/neg/bug963.scala @@ -0,0 +1,26 @@ +// Soundness bug, at #963 and dup at #2079. +trait A { + type T + var v : T +} + +object B { + def f(x : { val y : A }) { x.y.v = x.y.v } + + var a : A = _ + var b : Boolean = false + def y : A = { + if(b) { + a = new A { type T = Int; var v = 1 } + a + } else { + a = new A { type T = String; var v = "" } + b = true + a + } + } +} + +object Test extends Application { + B.f(B) +} -- cgit v1.2.3