Skip to content

Commit f0e77c5

Browse files
committed
Add objects around neg tests
1 parent 07951c3 commit f0e77c5

File tree

6 files changed

+13
-18
lines changed

6 files changed

+13
-18
lines changed

tests/neg/_TypeInterweaving/ab.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
object Ab:
2+
given String = ""
3+
given Double = 0
14

2-
given String = ""
3-
given Double = 0
5+
def ab[A][B](x: A)(using B): B = summon[B]
46

5-
def ab[A][B](x: A)(using B): B = summon[B]
6-
7-
def test =
8-
ab[Int](0: Int) // error
7+
def test =
8+
ab[Int](0: Int) // error
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
def f[T](x: T)[U](y: U) = (x,y)
2-
def f[T](x: T, y: T) = (x,y) // error
1+
object nameCollision:
2+
def f[T](x: T)[U](y: U) = (x,y)
3+
def f[T](x: T, y: T) = (x,y) // error
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object unmatched:
2+
def f1[T (x: T)] = ??? // error
3+
def f2[T(x: T) = ??? // error
4+
def f3(x: Any[)T] = ??? // error

tests/neg/_TypeInterweaving/unmatched1.scala

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/neg/_TypeInterweaving/unmatched2.scala

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/neg/_TypeInterweaving/unmatched3.scala

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)