Skip to content

Commit dee1152

Browse files
committed
Add a neg test for SAMs.
1 parent c01389d commit dee1152

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

test/dotc/tests.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ class tests extends CompilerTest {
110110
@Test def neg_i50_volatile = compileFile(negDir, "i50-volatile", xerrors = 6)
111111
@Test def neg_t0273_doubledefs = compileFile(negDir, "t0273", xerrors = 1)
112112
@Test def neg_zoo = compileFile(negDir, "zoo", xerrors = 12)
113+
@Test def neg_sam = compileFile(negDir, "sammy_poly", xerrors = 1)
113114
// TODO: this test file doesn't exist (anymore?), remove?
114115
// @Test def neg_t1192_legalPrefix = compileFile(negDir, "t1192", xerrors = 1)
115116

tests/pos/sammy_poly.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
trait F1[T, U] { def apply(x: T): U }
44
class T {
5+
import T._
56
// NOTE: the f(x) desugaring for now assumes the single abstract method is called 'apply'
67
def app1[T, U](x: T)(f: F1[T, U]): U = f(x)
78
def app2[T, U](x: T)(f: F2[T, U]): U = f(x)

0 commit comments

Comments
 (0)