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

Expressions for const definitions in FunC allow defining variables #729

Open
akifoq opened this issue Jun 18, 2023 · 0 comments
Open

Expressions for const definitions in FunC allow defining variables #729

akifoq opened this issue Jun 18, 2023 · 0 comments

Comments

@akifoq
Copy link
Contributor

akifoq commented Jun 18, 2023

The following code

const int x = (int y = 2) + 2;

_ main() {
  return y;
} 

causes the FunC compiler to crash

// automatically generated from `1.fc` 
DECLPROC main
main PROC:<{
fatal: Assertion failed at /usr/src/ton/crypto/func/func.h:1621: i >= 0 && i < depth() && "invalid stack reference"

FunC version: 0.4.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant