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

Missing support for bool consts in Tolk (0.8) #1519

Open
Skydev0h opened this issue Feb 11, 2025 · 0 comments
Open

Missing support for bool consts in Tolk (0.8) #1519

Skydev0h opened this issue Feb 11, 2025 · 0 comments

Comments

@Skydev0h
Copy link

It is not possible to define a bool const, it is automatically created as int const.

This causes issues when passing as a bool parameter or when passing to storeBool.

Such constants can be used to make code more self explanatory and easier to understand, for example:

...

const ONLY_NECESSARY = true;
const ALL_DATA = false;

...

fun loadData(onlyNecessary: bool) {
...
    if (onlyNecessary) {
        return;
    }
...
}

...

fun onInternalMessage(myBalance: int, msgValue: int, msgFull: cell, msgBody: slice) {
...
    loadData(ALL_DATA);
...
}

fun onExternalMessage(inMsg: slice) {
...
    loadData(ONLY_NECESSARY);
...
}
@Skydev0h Skydev0h changed the title Missing support for bool consts in Tolk Missing support for bool consts in Tolk (0.8) Feb 11, 2025
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