Skip to content

Commit 4759929

Browse files
authored
Merge pull request #76 from scala/backport-lts-3.3-21849
Backport "fix: Allow `as` as an infix type in non context bound types" to 3.3 LTS
2 parents fb56bb7 + e46c78f commit 4759929

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -4467,4 +4467,4 @@ object Parsers {
44674467
(EmptyValDef, List(EmptyTree))
44684468
}
44694469
}
4470-
}
4470+
}

tests/pos/i21769.scala

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
infix trait as[From, To]
3+
4+
val conv: (String as Int) = ???
5+
given instance: (String as Int) = ???
6+
def test(ev: (String as Int)) = ???
7+
8+
class F
9+
10+
class K extends (F as K)

0 commit comments

Comments
 (0)