From 40675e6939382a9063e5ac812725f93d17f9f98a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 11 Apr 2017 15:54:20 +0200 Subject: Fix #2212: Avoid imports in the wrong namespace Don't issue an error if when considering a named import that refers to a valoe or type which does not exist. Instead, disregard the import an continue. --- tests/pos/i2212.scala | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/pos/i2212.scala (limited to 'tests') diff --git a/tests/pos/i2212.scala b/tests/pos/i2212.scala new file mode 100644 index 000000000..416c8ca04 --- /dev/null +++ b/tests/pos/i2212.scala @@ -0,0 +1,19 @@ +package object squants { + type Time = squants.time.Time +} +package squants.time { + class Time + object Time { def x = 2 } +} +package squants.velocity { + import squants.time._ // <-- imports `Time` value + import squants.Time // <-- imports type alias + object Velocity { Time.x } +} + +import scala.math.BigDecimal.RoundingMode +import scala.math.BigDecimal.RoundingMode.RoundingMode + +object Money { + def foo(round: RoundingMode = RoundingMode.HALF_EVEN): Int = ??? +} -- cgit v1.2.3 From 552d85626aabab273213622df14544f154fbc4ca Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 11 Apr 2017 17:31:14 +0200 Subject: Increase time limit for failing test --- tests/run/t5857.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/run/t5857.scala b/tests/run/t5857.scala index eabf5dc86..fe67a7546 100644 --- a/tests/run/t5857.scala +++ b/tests/run/t5857.scala @@ -36,10 +36,9 @@ object Test { b } - // whatever it is, it should be less than, say, 250ms + // whatever it is, it should be less than, say, 1000ms // if `max` involves traversal, it takes over 5 seconds on a 3.2GHz i7 CPU //println(exectime) - assert(exectime < 250, exectime) + assert(exectime < 1000, exectime) } - } -- cgit v1.2.3