Skip to content

Comments

Fix ExternalSymbol location#1906

Merged
certik merged 2 commits intolcompilers:mainfrom
certik:loc_fix
Jun 14, 2023
Merged

Fix ExternalSymbol location#1906
certik merged 2 commits intolcompilers:mainfrom
certik:loc_fix

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