diff options
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/i2212.scala | 19 | ||||
-rw-r--r-- | tests/pos/i2218.scala | 9 |
2 files changed, 28 insertions, 0 deletions
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 = ??? +} diff --git a/tests/pos/i2218.scala b/tests/pos/i2218.scala new file mode 100644 index 000000000..fbede8b9b --- /dev/null +++ b/tests/pos/i2218.scala @@ -0,0 +1,9 @@ +trait Rule[In] + +class C { + def ruleWithName[In](f: In => Int): Rule[In] = { + new DefaultRule(f) {} + } + + class DefaultRule[In](f: In => Int) extends Rule[In] +} |