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

Parse failure on Some(new C<nat>(0)) #3366

Closed
mschlaipfer opened this issue Jan 13, 2023 · 0 comments · Fixed by #3374
Closed

Parse failure on Some(new C<nat>(0)) #3366

mschlaipfer opened this issue Jan 13, 2023 · 0 comments · Fixed by #3374
Labels
kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label

Comments

@mschlaipfer
Copy link
Member

Dafny version

3.10.0

Code to produce this issue

class C<T> {
    constructor (x: T) {}
  }

  datatype O<T> = Some(x: T) | None

  method main() {
    // works
    var v := new C<nat>(0);
    var c := Some(v);

    // fails when inlining v
    var c2 := Some(new C<nat>(0));
  }

Command to run and resulting output

`dafny bug.dfy`

What happened?

Getting a parse error when inlining v, in the line defining c2.

bug.dfy(13,19): Error: closeparen expected
1 parse errors detected in bug.dfy

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

Mac

@mschlaipfer mschlaipfer added the kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label label Jan 13, 2023
MikaelMayer added a commit that referenced this issue Jan 18, 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
1 participant