Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix ExternalSymbol location #1906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 14, 2023
Merged

Fix ExternalSymbol location #1906

merged 2 commits into from
Jun 14, 2023

Conversation

certik
Copy link
Contributor

@certik certik commented Jun 14, 2023

Improve shadowing warning messages.

Now they look like this:

$ lpython integration_tests/modules_02.py 
warning: The symbol 'f' imported from modules_02b will shadow the existing symbol 'f'
 --> integration_tests/modules_02.py:1:25
  |
1 | from modules_02b import f, f
  |                         ^ old symbol
  |
1 | from modules_02b import f, f
  |                            ^ new symbol

and

$ lpython --show-c mat_vec_device.py -I../.. -I. -Iemulation > x
warning: The symbol 'SM_REG3' imported from gchl_defs will shadow the existing symbol 'SM_REG3'
  --> mat_vec_device.py:25:25
   |
25 |                         SM_REG3, VR16_G0, VR16_G1, VR16_G2, VR16_G3, VR16_G4, VR16_G5, VR16_G6, VR16_G7,
   |                         ^^^^^^^ old symbol
   |
29 |                         SM_REG0, SM_REG1, SM_REG2, SM_REG3, SM_0XFFFF, SM_0X0001, SM_0X1111, SM_0X0101,
   |                                                    ^^^^^^^ new symbol

@certik certik enabled auto-merge June 14, 2023 14:33
@certik certik merged commit 4a87aab into lcompilers:main Jun 14, 2023
@certik certik deleted the loc_fix branch June 14, 2023 18:51
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