Skip to content

Commit 0a93f94

Browse files
WojciechMazurtgodzik
authored andcommitted
Handle old given syntax where identifier and type are seperated by new line (scala#21957)
Fixes scala#21768 Fixes usages of `with {...}` and `= new {}` declarations presented in tests.
1 parent def1144 commit 0a93f94

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/pos/i21768.scala

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
trait Foo[T]:
3+
def foo(v: T): Unit
4+
5+
given myFooOfInt:
6+
Foo[Int] with
7+
def foo(v: Int): Unit = ???
8+
9+
given myFooOfLong:
10+
Foo[Long] = new Foo[Long] {
11+
def foo(v: Long): Unit = ???
12+
}

0 commit comments

Comments
 (0)