diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-05-27 13:36:48 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-05-29 19:57:02 +0200 |
commit | 851e39991e7a929e1d83d5e35a024d5b9bd0b75f (patch) | |
tree | d31ab190abb8db0d3c21bd017098bfb6aebc62f6 /test/pending/pos/t7234b.scala | |
parent | 0da2b2c96b6dc91d95a54725bc04381fc0eda43b (diff) | |
download | scala-851e39991e7a929e1d83d5e35a024d5b9bd0b75f.tar.gz scala-851e39991e7a929e1d83d5e35a024d5b9bd0b75f.tar.bz2 scala-851e39991e7a929e1d83d5e35a024d5b9bd0b75f.zip |
SI-7516 Revert "SI-7234 Make named args play nice w. depmet types"
This reverts commit 83c9c764b528a7a1c1d39c480d22c8e3a71d5a58.
The tests are shunted to 'pending'.
Why revert this seemingly innocous commit? 83c9c764 generates a ValDef whose
tpt TypeTree has no original; this contains a reference to the symbol for `d`.
resetAttrs and the retypecheck assigns a new symbol for d and leaves a the
reference to the prior symbol dangling. The real bug is the resetAttrs concept.
Diffstat (limited to 'test/pending/pos/t7234b.scala')
-rw-r--r-- | test/pending/pos/t7234b.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/pending/pos/t7234b.scala b/test/pending/pos/t7234b.scala new file mode 100644 index 0000000000..fee98e87a8 --- /dev/null +++ b/test/pending/pos/t7234b.scala @@ -0,0 +1,20 @@ +trait Main { + trait A { + type B + def b: B + } + trait C { + def c(a: A, x: Int = 0)(b: => a.B, bs: a.B*) + def d(a: A = null, x: Int = 0)(b1: => a.B = a.b, b2: a.B = a.b) + } + def c: C + def ok(a: A)(b: a.B) = c.c(a, 42)(b) + def fail(a: A)(b: a.B) = c.c(a)(b) + def fail2(a: A)(b: a.B) = c.c(a)(b, b) + def fail3(a: A)(b: a.B) = c.c(a)(b, Seq[a.B](b): _*) + + def fail4(a: A)(b: a.B) = c.d(a)() + def fail5(a: A)(b: a.B) = c.d(a)(b1 = a.b) + def fail6(a: A)(b: a.B) = c.d(a)(b2 = a.b) + def fail7(a: A)(b: a.B) = c.d()() +} |