forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request scala#11063 from dotty-staging/fix-#11057
Generalize isArgPrefixOf
- Loading branch information
Showing
2 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
object data { | ||
|
||
trait OfType[T] | ||
case object IntT extends OfType[Int] | ||
case object DoubleT extends OfType[Double] | ||
case object FloatT extends OfType[Float] | ||
|
||
type DSeq[X] = scala.collection.immutable.AbstractSeq[X] | ||
|
||
case class ColumnName[T](n:String, t: OfType[T]) | ||
case class Column[T,F[_]<:DSeq[_]](n:F[T], of: ColumnName[T]) | ||
} | ||
|
||
def min4[T,F[_]<:data.DSeq[T]](col: data.Column[T,F])(using Ordering[T]): T = { | ||
col match { | ||
case c:data.Column[Int,_] => c.n.min[T](Ordering[T]) | ||
case _:data.Column[Double,_] => ??? | ||
case _:data.Column[Float,_] => ??? | ||
} | ||
} |