Skip to content

Commit 62d8ef1

Browse files
KacperFKorbantgodzik
authored andcommitted
fix: Allow as as an infix type in non context bound types
1 parent 65fb2f4 commit 62d8ef1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 10 additions & 0 deletions
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)