Skip to content

Fix overload selection for a false argument - #1085

Merged
borkdude merged 2 commits into
masterfrom
false-arg-overload
Sep 4, 2026
Merged

Fix overload selection for a false argument#1085
borkdude merged 2 commits into
masterfrom
false-arg-overload

Conversation

@borkdude

@borkdude borkdude commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

is-congruent? derived the argument class with (when arg ...), so false read as nil and only the non-primitive overload matched. (Boolean. false) and (Boolean/valueOf false) then picked the String overload and threw ClassCastException. Use when-some, like the Java Reflector's null check.

is-congruent? derived the argument class with (when arg ...), so false
read as nil and only the non-primitive overload matched. (Boolean. false)
and (Boolean/valueOf false) then picked the String overload and threw
ClassCastException. Use when-some, like the Java Reflector's null check.
The native test binary reads its options as edn, so a Class in :classes
cannot cross that boundary. String is a default class, and
(String/valueOf false) hit the same bug, so that form runs on both.
The Boolean forms stay JVM-only.
@borkdude
borkdude merged commit ebd3462 into master Sep 4, 2026
13 checks passed
@borkdude
borkdude deleted the false-arg-overload branch September 4, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant