ReviewOS

also looking at this

craft-native/craft

fix(android): jsQuote takes Any?, because three call sites are not strings

#164
Merged glennmichael123 wants to merge fix/android-jsquote-types into main
2 files +18 -5
packages/zig/test/android_reply_escaping_test.zigmodified+9-1
Changes to packages/zig/test/android_reply_escaping_test.zig
@@ -143,6 +143,14 @@ test "the templates that answer the page are actually in the scanned set" {
143143
144144 // And the fix is present rather than the sites merely being deleted.
145145 const bridge = sourceOf("CraftBridge.kt.template").?;
146 try testing.expect(std.mem.indexOf(u8, bridge, "private fun jsQuote(") != null);
147146 try testing.expect(std.mem.count(u8, bridge, "jsQuote(") >= 50);
147
148 // `Any?`, not `String?`. The call sites replaced string interpolation,
149 // which accepts anything — `contactId` is a Long, `downloadId` is a Long,
150 // `errString` is a CharSequence — and narrowing the parameter back makes
151 // those three sites stop compiling. Nothing in CI compiles Kotlin, so this
152 // is the only thing that would say so. See #163.
153 try testing.expect(
154 std.mem.indexOf(u8, bridge, "private fun jsQuote(value: Any?): String") != null,
155 );
148156}