diff options
author | Martin Odersky <odersky@gmail.com> | 2015-10-25 17:09:32 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-10-25 17:09:32 +0100 |
commit | 7947a7b0fc818128f5e2a0cd10cc43d2d7614354 (patch) | |
tree | 90b86a23c2713754a21d7f030ecf3205a151e014 /tests/pos | |
parent | 08df804a5b4b7289a1518aa5ccf9753ec1a8cd7a (diff) | |
download | dotty-7947a7b0fc818128f5e2a0cd10cc43d2d7614354.tar.gz dotty-7947a7b0fc818128f5e2a0cd10cc43d2d7614354.tar.bz2 dotty-7947a7b0fc818128f5e2a0cd10cc43d2d7614354.zip |
Fix hole in subtyping of modules
We did not handle correctly the case exemplified by `range.scala`: A module this type, which
is compared with a getter to the same module. Seen in the wild in scala.math.BigDecimal.
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/range.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/pos/range.scala b/tests/pos/range.scala new file mode 100644 index 000000000..9e7b5d1c9 --- /dev/null +++ b/tests/pos/range.scala @@ -0,0 +1,9 @@ +import scala.math._ +import collection.immutable.NumericRange +object Test { + val r1: scala.collection.immutable.Range.Partial = ??? + val r2: scala.Range.Partial = r1 + def until(d: BigDecimal, end: BigDecimal): Range.Partial[BigDecimal, NumericRange.Exclusive[BigDecimal]] = + new Range.Partial(until(d, end, _)) + def until(d: BigDecimal, end: BigDecimal, step: BigDecimal) = Range.BigDecimal(d, end, step) +} |