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

Issue with 'innermost scoping unit' constraint #119

Merged
merged 5 commits into from
Jun 7, 2024

Conversation

aury6623
Copy link
Contributor

There are a few issues with the constraints removed in this edit:

  • I think that "innermost scoping unit" here is a bit too vague, especially because...
  • This paper does not define <deferred-arg-list>, since that comes from papers 2 & 3. There should at least be a note about that.
  • I think all of these need to constrain themselves to <deferred-arg>s appearing in their declaration statements, like the constraint for deferred procedures. For example, a <deferred-const> can appear in an expression context without it appearing in the <deferred-arg-list> of the innermost scoping unit, if it's host associated. It's only when the <deferred-arg> appears in a declaration context (including a REQUIRES statement) that it must be in the <deferred-arg-list>.

Given that, this PR contains my suggested new wording. I think we can combine all of these into a single constraint, plus a note.

The new constraint wording is loosely based on a similar constraint from the F2023 standard:

C746 A <type-param-name> in a <type-param-def-stmt> in a <derived-type-def> shall be one of the <type-param-name>s in the <derived-type-stmt> of that <derived-type-def>.

But I couldn't find any perfectly analogous existing constraint that I could directly borrow wording from.

If we choose not to combine all 4 of these constraints into 1, we should at least combine the last two, as: "Each <deferred-type> or <deferred-class> shall appear...", since we do that in the constraint right above those which deals with the EXTENDS attribute.

@@ -183,6 +183,15 @@ Note: Deferred arguments are local identifiers and are not externally
<<or>> <deferred-proc-declaration-stmt>
<<or>> <deferred-type-declaration-stmt>

Constraint: A <deferred-arg> that appears in a <deferred-arg-decl-stmt>

Choose a reason for hiding this comment

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

Suggested change
Constraint: A <deferred-arg> that appears in a <deferred-arg-decl-stmt>
Constraint: A <deferred-arg> that appears in a <deferred-arg-explicit-stmt>

@everythingfunctional everythingfunctional merged commit 55b4f1b into j3-fortran:main Jun 7, 2024
@aury6623 aury6623 deleted the aury-edit3 branch June 10, 2024 15:16
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.

None yet

3 participants