Skip to content

Commit f7ff617

Browse files
committed
Test types of pattern bound variables
1 parent 8b300a7 commit f7ff617

File tree

8 files changed

+9
-0
lines changed

8 files changed

+9
-0
lines changed

tests/run/i8577a.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ extension (inline ctx: Macro.StrCtx) inline def unapplySeq(inline input: Int): O
1111

1212
@main def Test: Unit =
1313
val mac"$x" = 1
14+
val y: Int = x
1415
assert(x == 1)

tests/run/i8577b.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ extension (inline ctx: Macro.StrCtx) inline def unapplySeq[U](inline input: U):
1111

1212
@main def Test: Unit =
1313
val mac"$x" = 1
14+
val y: Int = x
1415
assert(x == 1)

tests/run/i8577c.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ extension [T] (inline ctx: Macro.StrCtx) inline def unapplySeq(inline input: T):
1111

1212
@main def Test: Unit =
1313
val mac"$x" = 1
14+
val y: Int = x
1415
assert(x == 1)

tests/run/i8577d.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ extension [T] (inline ctx: Macro.StrCtx) inline def unapplySeq[U](inline input:
1111

1212
@main def Test: Unit =
1313
val mac"$x" = 1
14+
val y: Int = x
1415
assert(x == 1)

tests/run/i8577e.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ extension [T] (inline ctx: Macro.StrCtx) inline def unapplySeq[U](inline input:
1111

1212
@main def Test: Unit =
1313
val mac"$x" = (1, 2)
14+
val x2: (Int, Int) = x
1415
assert(x == (1, 2))
1516

1617
val mac"$y" = (1, "a")
18+
val y2: (Int, String) = y
1719
assert(y == (1, "a"))

tests/run/i8577f.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ object Macro:
1111
Some(Seq(input))
1212

1313
val mac"$x" = 1
14+
val y: Int = x
1415
assert(x == 1)

tests/run/i8577g.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ extension [T] (inline ctx: Macro.StrCtx) inline def unapplySeq[U](inline input:
1111

1212
@main def Test: Unit =
1313
val mac"$x" = 1
14+
val y: Int = x
1415
assert(x == 1)

tests/run/i8577h.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ extension [T] (inline ctx: Macro.StrCtx) inline def unapplySeq[U](inline input:
1111

1212
@main def Test: Unit =
1313
val mac"$x" = 1
14+
val y: Int = x
1415
assert(x == 1)

0 commit comments

Comments
 (0)