Skip to content

Commit 5bc43d3

Browse files
committed
Add regression tests for #18123
1 parent b28d4c1 commit 5bc43d3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/pos/i18123.scala

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// may not compile anymore in Scala 3.4+
2+
package pkg
3+
4+
trait P[+T]
5+
6+
extension [T](inline parse0: P[T])
7+
inline def | [V >: T](inline other: P[V]): P[V] = ???
8+
9+
extension [T](inline parse0: => P[T])
10+
inline def rep[V](inline min: Int = 0)(using repeater: Implicits.Repeater[T, V]): P[V] = ???
11+
12+
object Implicits:
13+
trait Repeater[-T, R]
14+
object Repeater:
15+
implicit def GenericRepeaterImplicit[T]: Repeater[T, Seq[T]] = ???
16+
17+
sealed trait RegexTree
18+
abstract class Node extends RegexTree
19+
class CharClassIntersection() extends Node
20+
21+
def classItem: P[RegexTree] = ???
22+
def charClassIntersection: P[CharClassIntersection] = ???
23+
24+
def x =
25+
(charClassIntersection.rep() | classItem.rep())

0 commit comments

Comments
 (0)