Skip to content
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

Dyno: fix nested type queries #26693

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

DanilaFe
Copy link
Contributor

Closes https://github.com/Cray/chapel-private/issues/6474.

This seemed to be a problem to do with partial instantiations of types. We only handled passing (partially) instantiated class types to fully generic formals. This PR changes this by sharing the instantiation logic between record types and class types, and fixing a minor issue about (incompatible) param instantiations.

Testing

  • dyno tests

@@ -1254,6 +1254,16 @@ bool canInstantiateSubstitutions(Context* context,
auto r = canPass(context, mySubType, pSubType);
if (r.passes() && !r.promotes() && !r.converts()) {
// instantiation and same-type passing are allowed here
//
// canPass doesn't check param values for equivalence to allow handling
// coerciions and narrowing, so explicitly check them here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "coerciions"

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.

2 participants