From 4b1d08928bd008a23fa40490d2998e58a6f06c4d Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 25 Oct 2015 12:54:11 +0100 Subject: Represent references to Scala2 inner classes as WithFixedSym types Reason: An inner Scala2 class might be shadowed by a same-named class in a subtype. In Dotty this is disallowed butin Scala 2 it is possible. For instance, math.Numeric and math.Ordering both have an inner class "Ops". Normal TypeRef types could not select the shadowed class in Ordering is the prefix is of type Numeric. --- tests/pos/GenTraversableFactory.scala | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tests/pos') diff --git a/tests/pos/GenTraversableFactory.scala b/tests/pos/GenTraversableFactory.scala index e5cba4501..2f93ab27b 100644 --- a/tests/pos/GenTraversableFactory.scala +++ b/tests/pos/GenTraversableFactory.scala @@ -219,14 +219,10 @@ extends GenericCompanion[CC] { val b = newBuilder[T] b sizeHint immutable.NumericRange.count(start, end, step, isInclusive = false) var i = start - - { - val ord: Ordering[T] = num - implicit val ops: T => ord.Ops = ord.mkOrderingOps - while (if (step < zero) end < i else i < end) { + while (if (/*num.mkOrderingOps*/(step) < zero) end < i else i < end) { b += i i += step - }} + } b.result() } -- cgit v1.2.3