From e1ff392bb2dac2d6f0a44f358b7b2efd8c5dca75 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Mon, 2 Nov 2026 21:22:47 +0100 Subject: [PATCH] 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 --- tests/test_matrix_known_classes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_matrix_known_classes.c b/tests/test_matrix_known_classes.c index 61e5d0670..3b93dcc2e 100644 --- a/tests/test_matrix_known_classes.c +++ b/tests/test_matrix_known_classes.c @@ -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(_ a: T, _ b: T) -> T {", "Function", 1, 0, true}, {"mkc_c5_ruby_duck_typed_call", "run", "first(items)", "first", "def first(collection)",