Skip to content

Commit e546f07

Browse files
committed
Add so68877939.scala
1 parent 69ac5fb commit e546f07

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/pos/so68877939.scala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
abstract class Quantity[A <: Quantity[A]]
2+
sealed trait UnitOfMeasure[A <: Quantity[A]]
3+
4+
class Time extends Quantity[Time]
5+
object Minutes extends UnitOfMeasure[Time]
6+
7+
class PowerRamp extends Quantity[PowerRamp]
8+
object KilowattsPerHour extends UnitOfMeasure[PowerRamp]
9+
10+
type Test[X <: UnitOfMeasure[?]] = X match
11+
case UnitOfMeasure[t] => t
12+
13+
@main def main =
14+
summon[Test[Minutes.type] =:= Time]
15+
summon[Test[KilowattsPerHour.type] =:= PowerRamp]

0 commit comments

Comments
 (0)