From a11a57735e73d66147f9f6166687ad7bc04feca8 Mon Sep 17 00:00:00 2001 From: Aleksandar Prokopec Date: Mon, 7 May 2012 15:39:53 +0200 Subject: Fixes SI-5629. Adds an additional argument to the unify method in specialization - `tparams`. When this parameter is set to `true`, unification is done over type parameters in poly types as well. Additionally, the unification in specialization now works over type bounds. This ensures that in the below example: trait Foo[@specialized(Int) A] { def bar[B <: A](b: B) {} } class IntFoo extends Foo[Int] { override def bar[B <: Int](b: B) {} } the method `bar` gets correctly determined as a method that needs a special override for its `bar$mcI$sp`. --- test/files/run/t5629b.check | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/files/run/t5629b.check (limited to 'test/files/run/t5629b.check') diff --git a/test/files/run/t5629b.check b/test/files/run/t5629b.check new file mode 100644 index 0000000000..1bc0248c3d --- /dev/null +++ b/test/files/run/t5629b.check @@ -0,0 +1,10 @@ +=== pf(1): +MySmartPF.apply entered... +newPF.applyOrElse entered... +default +scala.MatchError: () (of class scala.runtime.BoxedUnit) +=== pf(42): +MySmartPF.apply entered... +newPF.applyOrElse entered... +ok +=== done -- cgit v1.2.3