Skip to content

fix(sema): keep builtin import notes on source locations#1855

Open
malsomesh9 wants to merge 1 commit intohyperledger-solang:mainfrom
malsomesh9:codex/fix-1308-diagnostic-notes
Open

fix(sema): keep builtin import notes on source locations#1855
malsomesh9 wants to merge 1 commit intohyperledger-solang:mainfrom
malsomesh9:codex/fix-1308-diagnostic-notes

Conversation

@malsomesh9
Copy link
Copy Markdown

Summary

Fix builtin import diagnostics so duplicate-definition notes point to source locations instead of crashing when the original definition comes from a builtin.

Changes

  • rewrite imported builtin function note locations to use the import site
  • report builtin duplicate definitions as already defined as a builtin function
  • make the diagnostic renderer tolerate any remaining notes without file locations
  • add a regression test for importing polkadot and redefining chain_extension

Verification

  • cargo fmt --all
  • attempted targeted regression test, but this machine does not have a system LLVM installation for llvm-sys, which blocks the default Solang test build

Fixes #1308

Signed-off-by: Somesh Mal <malsomesh9@gmail.com>
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.

Support for diagnostic notes without file locations

1 participant