From b8518701339b5b73a99663082021f0db90c7dca8 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Wed, 28 Oct 2026 15:36:06 -0700 Subject: [PATCH] fix(ffi): call #188's inferred instances from the Kotlin test #184 and #188 merged apart: #188 added apply, report, wrapped, and keeps to the api fixture's native transcript and its C and C++ tests, while #184's Kotlin test predates them, so `just ffi test` fails on main. Co-Authored-By: Claude Opus 5.5 --- ffi/tests/api.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ffi/tests/api.kt b/ffi/tests/api.kt index 4ad6c4a89..3ecf4bb56 100644 --- a/ffi/tests/api.kt +++ b/ffi/tests/api.kt @@ -237,6 +237,13 @@ fun script() { println("cross ${cross(LeftRightU8(RightU8(1u)), RightLeftU8(LeftU8(2u)))} outer ${OuterInnerU8.new(4u).get()}") // A bound that outlives the call takes a value, and an instance only a constant names. println("kept ${keptPoint(Point(1, -2))} boxed ${BOXED.value}") + // Inferred instances taking a lent closure and a foreign implementation, and one only + // its impl of a trait names. + val sides = PairU32(2u, 5u) + println("apply ${applyU32(sides) { side -> side * 3u }}") + println("report ${reportU32(sides, PrintLog())}") + println("wrapped ${keptWrapU32(WrapU32(4u))}") + println("keeps ${keeps(PrintLog()).value}") // Its Drop runs when Kotlin closes the handle, not before. val token = Token.new(7u)