Skip to content

Locate representation conversion diagnostics at their source - #601

Merged
LPTK merged 1 commit into
hkust-taco:hkmc2from
LPTK:codex/pr575-conversion-locations
Oct 30, 2026
Merged

LPTK merged 1 commit into
hkust-taco:hkmc2from
LPTK:codex/pr575-conversion-locations

Conversation

@LPTK

@LPTK LPTK commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Representation-conversion errors for implicit returns and synthetic constructor fields can omit their source span, and Wasm conversions discard locations available to their callers. Preserve the value, field-name, or enclosing-operation location when reporting these errors.

This extracts only E08 from #575: the diagnostic-location part of B05. The implementation is 19 added and 13 removed lines across two Scala files. Existing fixtures cover return and argument conversions; two small JS/Wasm regressions cover the constructor-field fallback. The remaining changes are regenerated diagnostic spans.

Validation: Metals compilation, ctest, cwtest, focused diff tests, and hkmc2AllTests/test (1,165 tests passed). Compared the regressions against hkmc2 to confirm the previously missing locations, reviewed the complete diff, and checked that existing test inputs and generated code remain unchanged.

@LPTK LPTK left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@LPTK
LPTK merged commit f458eaa into hkust-taco:hkmc2 Oct 30, 2026
1 check passed
@LPTK
LPTK deleted the codex/pr575-conversion-locations branch October 30, 2026 16:34
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.

2 participants