Skip to content

Commit 5d8c1ea

Browse files
committed
Add test
1 parent 73c2790 commit 5d8c1ea

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/pos/combine.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
trait Semigroup[A] {
2+
def (x: A) combine (y: A): A
3+
}
4+
delegate for Semigroup[Int] = ???
5+
delegate [A, B] for Semigroup[(A, B)] given Semigroup[A], Semigroup[B] = ???
6+
object Test extends App {
7+
((1, 1)) combine ((2, 2)) // doesn't compile
8+
((1, 1): (Int, Int)) combine (2, 2) // compiles
9+
//the error that compiler spat out was "value combine is not a member of ((Int, Int)) => (Int, Int)". what's
10+
}

0 commit comments

Comments
 (0)