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

Format 'record' and 'type' as code #3575

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

henrikt-ma
Copy link
Collaborator

Please see second commit for actual change.

Copy link
Collaborator

@HansOlsson HansOlsson left a comment

Choose a reason for hiding this comment

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

I'm not sure yet, but fundamentally I don't see a clear logic underlying this change.
The full line says "The components directly declared in a record may only be of specialized class record or type."

So, why is the first record not as code, but the second is?

I can understand keeping the first record as non-code, both because it would be too much code (when discussing the special class record) and because it is "record" as a language construct, not the keyword.

However, the latter argument also apply to the "record or type".

I can see that input, output, inner, ... are different as they would (normally) appear directly in the record declaration:

record R
   input R r; // Illegal due to prefix input
   M m; // Illegal since M is not a record
end R;
model M end M;

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