Skip to content

Commit 23a52c1

Browse files
committed
Add regression tests
1 parent 0383b06 commit 23a52c1

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

tests/pos/i9295b.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import scala.language.dynamics
2+
3+
class Foo extends Dynamic {
4+
def applyDynamic(name: String)()(using DummyImplicit): Bar = ???
5+
}
6+
7+
class Bar extends Dynamic {
8+
def applyDynamic(name: String)(x: Int) = ???
9+
}
10+
11+
val foo = new Foo
12+
def baz = foo.blah().apply(42)

tests/pos/i9295c.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import scala.language.dynamics
2+
3+
class Foo extends Dynamic {
4+
def selectDynamic(name: String)(using DummyImplicit): Bar = ???
5+
}
6+
7+
class Bar extends Dynamic {
8+
def applyDynamic(name: String)(x: Int) = ???
9+
}
10+
11+
val foo = new Foo
12+
def baz = foo.blah.apply(42)

0 commit comments

Comments
 (0)