Only check the label, not the label/pl, for duplicate imports#987
Only check the label, not the label/pl, for duplicate imports#987dpk wants to merge 1 commit intocisco:mainfrom
Conversation
|
Apologies for the bump, but I would appreciate an initial review of this. The problem is that when you use any kind of qualified import ( The question is whether it might be better to change it to avoid putting a label/pl in an If someone could confirm I’m on the right track or suggest a better way to fix this issue, I’ll add some tests and mark this ready to merge. |
|
I doubt that I'm the right person to comment here, but instead of this change, I would be inclined to change the to use That would be more in line with the formal argument name The discussion in PR #929 notes that when two imported modules provide different values for a given binding—property combination, the later import wins. That seems consistent with the way that |
Fixes #929.
I am not yet certain that this patch is complete. At the very least, this demonstrates that the behaviour of importing identifier properties appears to work as expected:
Details
However, I am not sure if
labelcan contain alabel/plas well as theentry-label. Moreover, the Right Thing is probably to still signal a duplicate if an imported identifier has a conflicting property definition, but this patch won’t do that. (Then again, this matches the behaviour that it also won’t stop you defining the same property multiple times in a body.)It may also be that there is a better place to fix this.
There should likely also be a test for this; the above example could serve as a basis.
I would appreciate feedback from those familiar with the innards of
syntax.ss.