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

Compiler crashes when comparing functions #940

Closed
1 of 4 tasks
t4ccer opened this issue May 12, 2024 · 0 comments
Closed
1 of 4 tasks

Compiler crashes when comparing functions #940

t4ccer opened this issue May 12, 2024 · 0 comments
Labels
bug Something isn't working typechecking Types and inference

Comments

@t4ccer
Copy link

t4ccer commented May 12, 2024

What Git revision are you using?

Compiled from source at 075668b

$ aiken --version
aiken v1.0.26-alpha+unknown

What operating system are you using, and which version?

  • Linux / Ubuntu
  • Linux / Other
  • macOS
  • Windows

Describe what the problem is?

fn not(x: Bool) -> Bool {
   when x is {
     False -> True
     True -> False
   }
}

fn foo() -> Bool {
   not == not
}

When using foo() anywhere in validator code, the compiler crashes.

   aiken::fatal::error
   Whoops! You found a bug in the Aiken compiler.
   
   Please report this error at https://github.com/aiken-lang/aiken/issues/new.
   In your bug report please provide the information below and if possible the code
   that produced it.
   
   Operating System: linux
   Architecture:     x86_64
   Version:          v1.0.26-alpha+unknown
   
   crates/aiken-lang/src/gen_uplc.rs:4193:77
   
       called `Result::unwrap()` on an `Err` value: NotAConstant(Lambda <a lot of uplc>)

What should be the expected behavior?

Type checker should not allow for comparing functions

@KtorZ KtorZ added bug Something isn't working typechecking Types and inference labels May 14, 2024
@KtorZ KtorZ closed this as completed in 26ef25b May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working typechecking Types and inference
Projects
Status: 🚀 Released
Development

No branches or pull requests

2 participants