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

IDE throws exception related to code actions #5355

Closed
keyboardDrummer opened this issue Apr 24, 2024 · 1 comment · Fixed by #5548
Closed

IDE throws exception related to code actions #5355

keyboardDrummer opened this issue Apr 24, 2024 · 1 comment · Fixed by #5548
Assignees
Labels
during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: language server Support for LSP in Dafny (server part; client is in ide-vscode repo)

Comments

@keyboardDrummer
Copy link
Member

module M {
  trait Object {
   ghost function typeId() : (id: string)
  }

  type A extends Object {
   ghost function typeId() : (id: string)  { "A" }
  }

  type B extends Object {
   ghost function typeId() : (id: string)  { "B" }
  }
  type C extends Object {
   ghost function typeId() : (id: string)  { "C" }
  }

  lemma test(x: Object)
    ensures multiset{x is A, x is B, x is C}[true] == 1
  {
    var _ := x.typeId();
    if (x is A) {
      assert x !is B.  // <----- Put the cursor here
    }
  }
}

Use project file:

[options]
general-traits="Datatype"
type-system-refresh=true

Result:

image
@keyboardDrummer keyboardDrummer added kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: language server Support for LSP in Dafny (server part; client is in ide-vscode repo) during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program labels Apr 24, 2024
@keyboardDrummer
Copy link
Member Author

Not fixed yet

@keyboardDrummer keyboardDrummer self-assigned this Jun 6, 2024
keyboardDrummer added a commit that referenced this issue Jun 10, 2024
Fixes #5355

### Description
- Fix null reference exception that occurred when looking at the tokens
of a generated node

### How has this been tested?
- Add LSP test

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: language server Support for LSP in Dafny (server part; client is in ide-vscode repo)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant