File tree 2 files changed +29
-2
lines changed
compiler/src/dotty/tools/dotc/typer
2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -1311,14 +1311,14 @@ trait Implicits:
1311
1311
else
1312
1312
var cmp = comp(using searchContext())
1313
1313
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
1315
1315
val prev = comp(using searchContext().addMode(Mode .OldImplicitResolution ))
1316
1316
if cmp != prev then
1317
1317
def choice (c : Int ) = c match
1318
1318
case - 1 => " the second alternative"
1319
1319
case 1 => " the first alternative"
1320
1320
case _ => " none - it's ambiguous"
1321
- if sv == SourceVersion .`3.5` then
1321
+ if sv.stable == SourceVersion .`3.5` then
1322
1322
report.warning(
1323
1323
em """ Given search preference for $pt between alternatives ${alt1.ref} and ${alt2.ref} will change
1324
1324
|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