Skip to content

Commit db92078

Browse files
committed
Add find ref as a bench test
1 parent 2fe5bcf commit db92078

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/bench/FindRef.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class MyInt(val x: Int) {
2+
def eq(that: MyInt): Boolean = this.x == that.x
3+
}
4+
5+
class Test {
6+
def foo(x: MyInt, y: MyInt): Boolean = x.eq(y)
7+
8+
val a = MyInt(2)
9+
val b = MyInt(3)
10+
foo(a, b)
11+
}

0 commit comments

Comments
 (0)