File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -1311,14 +1311,14 @@ trait Implicits:
13111311 else
13121312 var cmp = comp(using searchContext())
13131313 val sv = Feature .sourceVersion
1314- if sv == SourceVersion .`3.5` || sv == SourceVersion .`3.6-migration` then
1314+ if sv.stable == SourceVersion .`3.5` || sv == SourceVersion .`3.6-migration` then
13151315 val prev = comp(using searchContext().addMode(Mode .OldImplicitResolution ))
13161316 if cmp != prev then
13171317 def choice (c : Int ) = c match
13181318 case - 1 => " the second alternative"
13191319 case 1 => " the first alternative"
13201320 case _ => " none - it's ambiguous"
1321- if sv == SourceVersion .`3.5` then
1321+ if sv.stable == SourceVersion .`3.5` then
13221322 report.warning(
13231323 em """ Given search preference for $pt between alternatives ${alt1.ref} and ${alt2.ref} will change
13241324 |Current choice : ${choice(prev)}
Original file line number Diff line number Diff line change 1+ //> using options -source 3.5 -migration
2+
3+ final class StrictEqual [V ]
4+ final class Less [V ]
5+ type LessEqual [V ] = Less [V ] | StrictEqual [V ]
6+
7+ object TapirCodecIron :
8+ trait ValidatorForPredicate [Value , Predicate ]
9+ trait PrimitiveValidatorForPredicate [Value , Predicate ]
10+ extends ValidatorForPredicate [Value , Predicate ]
11+
12+ given validatorForLessEqual [N : Numeric , NM <: N ](using
13+ ValueOf [NM ]
14+ ): PrimitiveValidatorForPredicate [N , LessEqual [NM ]] = ???
15+ given validatorForDescribedOr [N , P ](using
16+ IsDescription [P ]
17+ ): ValidatorForPredicate [N , P ] = ???
18+
19+ trait IsDescription [A ]
20+ object IsDescription :
21+ given derived [A ]: IsDescription [A ] = ???
22+
23+ @ main def Test = {
24+ import TapirCodecIron .{* , given }
25+ type IntConstraint = LessEqual [3 ]
26+ summon[ValidatorForPredicate [Int , IntConstraint ]] // warn
27+ }
You can’t perform that action at this time.
0 commit comments