test(resolver): promote the Scala operator and generic call rows

The dynamic lane's Scala rules recovered these, and the matrix asks for promotion. Each row was read against its fixture and the index:

- `a + b` with `a: Vec2`, `def +(other: Vec2): Vec2`: `a.+(b)`, Vec2.+.
- `(a + b).dot(b)`: `+` declares Vec2 as its result, Vec2.dot.
- `first(ns)` with `def first[T](xs: List[T])`: the top-level def. A generic def had no arity before, so its calls abstained.

No false edge came with them: `x + other.x` on a Double field abstains as scala_value_of_unknown_type, and `Some(...)` as scala_name_not_in_project.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
Martin Vogel committed 2026-11-02 21:22:47 +01:00
1 parent 76aaffbebc
commit e1ff392bb2
1 file changed
+3 -3
+3 -3
View File
@@ -184,9 +184,9 @@ static const MKC_Golden mkc_goldens[] = {
{"mkc_c2_csharp_operator_plus", "operator+", "new Vec2(a.X + b.X, a.Y + b.Y)", "Vec2",
" public Vec2(float x, float y) { X = x; Y = y; }", "Method", 4, 0, true},
{"mkc_c2_scala_symbolic_method", "run", "a + b", "+",
" def +(other: Vec2): Vec2 = Vec2(x + other.x, y + other.y)", "Method", 2, 0, false},
" def +(other: Vec2): Vec2 = Vec2(x + other.x, y + other.y)", "Method", 2, 0, true},
{"mkc_c2_scala_symbolic_method", "run", "(a + b).dot(b)", "dot",
" def dot(other: Vec2): Double = x * other.x + y * other.y", "Method", 3, 0, false},
" def dot(other: Vec2): Double = x * other.x + y * other.y", "Method", 3, 0, true},
{"mkc_c2_ruby_operator_plus", "+", "Vec2.new(@x + other.x, @y + other.y)", "initialize",
" def initialize(x, y)", "Method", 3, 0, true},
{"mkc_c4_typescript_async_await", "getData", "fetch(url)", "fetch",
@@ -211,7 +211,7 @@ static const MKC_Golden mkc_goldens[] = {
{"mkc_c4_swift_async_await", "run", "getData(url: url)", "getData",
"func getData(url: String) async -> String {", "Function", 5, 0, true},
{"mkc_c5_scala_generic_call", "run", "first(ns)", "first",
"def first[T](xs: List[T]): Option[T] =", "Function", 1, 0, false},
"def first[T](xs: List[T]): Option[T] =", "Function", 1, 0, true},
{"mkc_c5_swift_generic_call", "run", "maxOf(a, b)", "maxOf",
"func maxOf<T: Comparable>(_ a: T, _ b: T) -> T {", "Function", 1, 0, true},
{"mkc_c5_ruby_duck_typed_call", "run", "first(items)", "first", "def first(collection)",