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

External Argument Default Mismatch specification doesn't account for all arguments #78

Open
danielreynolds1 opened this issue Dec 19, 2024 · 1 comment

Comments

@danielreynolds1
Copy link

In:

- Let {argumentNames} be the set of all argument names from all fields in
  {fields}.
- For each {argumentName} in {argumentNames}
  - Let {arguments} be the set of all arguments with the name
    {argumentName} from all fields in {fields}.
  - Let {defaultValue} be the first default value found in {arguments}.
  - Let {externalArguments} be the set of all arguments with the name
    {argumentName} from all fields in {externalFields}.
  - For each {externalArgument} in {externalArguments}
    - The default value of {externalArgument} must be equal to
      {defaultValue}.

defaultValue does not specify that it comes from the non-external argument. Therefore iterating over the external arguments prior to doing the check against defaultValue may result in the non-external argument never being accounted for.

@PascalSenn
Copy link
Contributor

Good point, something like this?

- Let {argumentNames} be the set of all argument names from all fields in
  {fields}.
- For each {argumentName} in {argumentNames}
  - Let {arguments} be the set of all arguments with the name
    {argumentName} from all fields in {fields}.
  - Let {defaultValues} be the all default values found in {arguments}.
  - Let {externalArguments} be the set of all arguments with the name
    {argumentName} from all fields in {externalFields}.
  - For each {externalArgument} in {externalArguments}
    - The default value of {externalArgument} must be equal to all
      {defaultValues}.

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

No branches or pull requests

2 participants