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

nameonly should not constrain default values #3859

Closed
seebees opened this issue Apr 11, 2023 · 0 comments · Fixed by #3864
Closed

nameonly should not constrain default values #3859

seebees opened this issue Apr 11, 2023 · 0 comments · Fixed by #3864
Assignees
Labels
kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label

Comments

@seebees
Copy link

seebees commented Apr 11, 2023

Dafny version

3.13

Code to produce this issue

datatype Foo = Foo(
  nameonly bar: Option<string> := None,
  nameonly baz: Option<string>
)


This is probably because `Foo("positional parameters", "have order")`.
However `nameonly` means that I MUST

```dafny
Foo(
  baz := "Look ma, no order!"
)


### Command to run and resulting output

_No response_

### What happened?

In the above example `baz` gets:
`a required parameter must precede all optional parameters`

### What type of operating system are you experiencing the problem on?

Mac
@seebees seebees added the kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label label Apr 11, 2023
@RustanLeino RustanLeino self-assigned this Apr 12, 2023
RustanLeino added a commit to RustanLeino/dafny that referenced this issue Apr 12, 2023
@davidcok davidcok self-assigned this Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants