aiken-lang / aiken

A modern smart contract platform for Cardano
https://aiken-lang.org
Apache License 2.0
474 stars 92 forks source link

Build failed with verbose output using `aiken build -t verbose` command #1029

Closed jougandev closed 2 weeks ago

jougandev commented 3 weeks ago

I attempted to trace the output value using trace assets.flatten(out.value) but encountered an error.

   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: macos
   Architecture:     aarch64
   Version:          v1.1.3+3d77b5c

   crates/aiken-lang/src/gen_uplc.rs:247:17

To reproduce the error:

 if cond {
   trace assets.flatten(out.value)
   expect ...
 }
MicroProofs commented 2 weeks ago

Can we see more of the code you used to produce this error. The example given is not enough to reproduce it.

MicroProofs commented 2 weeks ago

But I have a very strong feeling the error is caused by some code example that should result in a parse error.

I don't think it has anything to do with the trace. But rather the expect being the last line in a if expression.