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

C# backend not handling well module and datatype homonyms #5746

Open
MikaelMayer opened this issue Sep 4, 2024 · 0 comments
Open

C# backend not handling well module and datatype homonyms #5746

MikaelMayer opened this issue Sep 4, 2024 · 0 comments
Labels
difficulty: good-first-issue Good first issues invalid translated code The compiler generates invalid code, making the the target language infrastructure crash kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label lang: c# Dafny's C# transpiler and its runtime

Comments

@MikaelMayer
Copy link
Member

Dafny version

4.4.0

Code to produce this issue

module State {

  datatype State = State

}

module Foo {

   import opened State

   const bar: State

   method Main() {
     print "Hello!\n";
  }
}

Command to run and resulting output

dafny run file.dfy

What happened?

Dafny program verifier finished with 0 verified, 0 errors
Errors compiling program into tmphiUhb8.tmp
source(5712,25): error CS0426: The type name '_IState' does not exist in the type 'State'

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

Windows

@MikaelMayer MikaelMayer added the kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label label Sep 4, 2024
@MikaelMayer MikaelMayer changed the title Compilation to C# issues C# backend not handling well module and datatype homonyms Sep 4, 2024
@MikaelMayer MikaelMayer added invalid translated code The compiler generates invalid code, making the the target language infrastructure crash lang: c# Dafny's C# transpiler and its runtime difficulty: good-first-issue Good first issues labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: good-first-issue Good first issues invalid translated code The compiler generates invalid code, making the the target language infrastructure crash kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label lang: c# Dafny's C# transpiler and its runtime
Projects
None yet
Development

No branches or pull requests

1 participant