Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Conversation

@jjcnn
Copy link
Contributor

@jjcnn jjcnn commented Nov 23, 2020

This PR also fixes the bug where ADTs in nested imports were not added correctly to DataTypeDictionary while in scope.

@vaivaswatha : I have tested this using your Polynetwork standard library files. We have tests in our test suite that check for the cases where a module imports a name and also defines that same name, but we are missing the following cases:

  • An imported library imports and uses an ADT from a different library (your additon to stdlib adds this case)
  • An imported library X imports an ADT T from a different library, and the contract that imports X also defines T (this is allowed). When the contract uses T, then it should refer to the locally defined type and not the nested import. (Same story for constructor names)

I'll add these testcases, but do you want me to merge this PR before I add them, so that you are no longer blocked?

@jjcnn jjcnn merged commit 18f446b into master Nov 24, 2020
@jjcnn jjcnn deleted the nested_type_import_bug branch November 24, 2020 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants