Skip to content

Commit

Permalink
Add so68877939.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
mbovel committed Oct 15, 2024
1 parent 69ac5fb commit e546f07
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/pos/so68877939.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
abstract class Quantity[A <: Quantity[A]]
sealed trait UnitOfMeasure[A <: Quantity[A]]

class Time extends Quantity[Time]
object Minutes extends UnitOfMeasure[Time]

class PowerRamp extends Quantity[PowerRamp]
object KilowattsPerHour extends UnitOfMeasure[PowerRamp]

type Test[X <: UnitOfMeasure[?]] = X match
case UnitOfMeasure[t] => t

@main def main =
summon[Test[Minutes.type] =:= Time]
summon[Test[KilowattsPerHour.type] =:= PowerRamp]

0 comments on commit e546f07

Please sign in to comment.