You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kotlin: nested block comments are not nested (lexical_family standard_block), commented code leaks into every family #9423
Found by the SOP-002 gap-cell decoy suite (protocol SOP-002-v1, epic #8863).
Construct: a nested block comment in Kotlin. The Kotlin language spec allows /* outer /* inner */ still comment */ to nest. kotlin.py declares "lexical_family": "standard_block" (flat C-style) even though its own comment says it "officially allows nested block comments", so the first */ closes the comment and the rest of the comment text is treated as code.
Snippet (every Kotlin family leaks; shown with immutability_locks):
/* outer
/* inner
*/
const val MAX = 10
*/
Expected: 0 immutability_locks hits (the const val line is inside the outer comment). Actual: 1 hit. The same holds for listeners (/* a /* b */ button.setOnClickListener { } */), explicit_casts (... obj as Customer ...) and api.
Likely fix: switch kotlin to the nested-aware lexical family used by rust/swift/scala (recursive_block, see Prism._strip_nested_comments).
Locked in tests/decoys/test_decoy_kotlin.py as xfail(strict=True).
Activity