aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/GenTraversableFactory.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-10-25 12:54:11 +0100
committerMartin Odersky <odersky@gmail.com>2015-10-25 13:28:34 +0100
commit4b1d08928bd008a23fa40490d2998e58a6f06c4d (patch)
treeccaecfce1b90b2aeef1b851841d20b8531eeb556 /tests/pos/GenTraversableFactory.scala
parentdbc668f074b6e121f00a6a63ea55d1a3077f7eb1 (diff)
downloaddotty-4b1d08928bd008a23fa40490d2998e58a6f06c4d.tar.gz
dotty-4b1d08928bd008a23fa40490d2998e58a6f06c4d.tar.bz2
dotty-4b1d08928bd008a23fa40490d2998e58a6f06c4d.zip
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.
Diffstat (limited to 'tests/pos/GenTraversableFactory.scala')
-rw-r--r--tests/pos/GenTraversableFactory.scala8
1 files changed, 2 insertions, 6 deletions
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()
}