Untested suspicion from the independent review of #84. It concerns ScriptBytecodeTransformer, not the link check.
javac builds $SwitchMap$ for a switch over another class's enum with try { ... } catch (NoSuchFieldError ignored) {} around each constant, so a constant missing at runtime is skipped. When the transformer routes those reads through ScriptAccessLinker, a missing constant raises BootstrapMethodError, which that catch doesn't handle. The switch then fails instead of skipping the constant.
The link check refuses such a script (it matches the transformed runtime), so nothing runs wrongly. But a script that javac intends to tolerate a missing constant is refused.
To check: compile a switch over an application enum, remove one constant on the "server", and compare the untransformed and transformed runs. If confirmed, leave $SwitchMap$ initializers unlinked, or catch the linker's failure the way javac's catch expects.
🤖 Generated with Claude Code
Untested suspicion from the independent review of #84. It concerns ScriptBytecodeTransformer, not the link check.
javac builds
$SwitchMap$for a switch over another class's enum withtry { ... } catch (NoSuchFieldError ignored) {}around each constant, so a constant missing at runtime is skipped. When the transformer routes those reads through ScriptAccessLinker, a missing constant raises BootstrapMethodError, which that catch doesn't handle. The switch then fails instead of skipping the constant.The link check refuses such a script (it matches the transformed runtime), so nothing runs wrongly. But a script that javac intends to tolerate a missing constant is refused.
To check: compile a switch over an application enum, remove one constant on the "server", and compare the untransformed and transformed runs. If confirmed, leave
$SwitchMap$initializers unlinked, or catch the linker's failure the way javac's catch expects.🤖 Generated with Claude Code