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# compilation error on a function returning complex sequence #1326

Open
sorawee opened this issue Jul 25, 2021 · 0 comments
Open

C# compilation error on a function returning complex sequence #1326

sorawee opened this issue Jul 25, 2021 · 0 comments
Labels
kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label lang: c# Dafny's C# transpiler and its runtime part: code-generation Support for transpiling Dafny to another language. If relevant, add a `lang:` tag

Comments

@sorawee
Copy link
Contributor

sorawee commented Jul 25, 2021

I apologize for this complex code, but this is the most I can minimize without losing the bug.

method Main () 
{
  var x1 := 1;
  var x2 := 1;
  var x3 := 1;
  var x4 := 1;
  var x5 := 1;
  var x6 := 1;
  var x7 := [1];
  var x8 := [1];
  var x9 := [1];
  var x10 := [1];
  var x11 := [1];
  var x12 := [[1]];
  var x13 := [[1]];
  var x14 := [[1]];
  var x15 := [[1]];
  var x16 := [[1]];
  var x17 := [[[1]]];
  var _ := () => [[[[x1, x2, x3], []], x12, x13, x14], [[x7, x8, x9], [[x4, x5, x6], x10, x11], x15, x16], x17];
}

It compiles fine to Java, Go, and JS, but errors on C# with the following error message:

Errors compiling program:
(1812,35): error CS0305: Using the generic type 'Func<TResult>' requires 1 type arguments
@keyboardDrummer keyboardDrummer added kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label lang: c# Dafny's C# transpiler and its runtime labels Jul 26, 2021
@robin-aws robin-aws added the part: code-generation Support for transpiling Dafny to another language. If relevant, add a `lang:` tag label Sep 22, 2021
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 lang: c# Dafny's C# transpiler and its runtime part: code-generation Support for transpiling Dafny to another language. If relevant, add a `lang:` tag
Projects
None yet
Development

No branches or pull requests

3 participants