-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat 3.5-migration the same as 3.5 for a warning (#20436)
Treat 3.5-migration the same as 3.5 for a warning about implicit priority change Fixes #20420
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 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,27 @@ | ||
//> using options -source 3.5-migration | ||
|
||
final class StrictEqual[V] | ||
final class Less[V] | ||
type LessEqual[V] = Less[V] | StrictEqual[V] | ||
|
||
object TapirCodecIron: | ||
trait ValidatorForPredicate[Value, Predicate] | ||
trait PrimitiveValidatorForPredicate[Value, Predicate] | ||
extends ValidatorForPredicate[Value, Predicate] | ||
|
||
given validatorForLessEqual[N: Numeric, NM <: N](using | ||
ValueOf[NM] | ||
): PrimitiveValidatorForPredicate[N, LessEqual[NM]] = ??? | ||
given validatorForDescribedOr[N, P](using | ||
IsDescription[P] | ||
): ValidatorForPredicate[N, P] = ??? | ||
|
||
trait IsDescription[A] | ||
object IsDescription: | ||
given derived[A]: IsDescription[A] = ??? | ||
|
||
@main def Test = { | ||
import TapirCodecIron.{*, given} | ||
type IntConstraint = LessEqual[3] | ||
summon[ValidatorForPredicate[Int, IntConstraint]] // warn | ||
} |