Skip to content

assert does not work as in documentation #9

@utdrmac

Description

@utdrmac

Consider the following fi code:

const address MY_ADD "tz1R5QtyaUKV4az8YpGGKVhe8Wf7rou9SaVa";

entry a(){
    if (MY_ADD != address "tz1NogVV7RShvFq3nd1vgxRKu1ocZKofGmmm") {
        throw(string "DUDE THATs NOT ME");
    }
    assert(MY_ADD != address "tz1NogVV7RShvFq3nd1vgxRKu1ocZKofGmmm", string "NOPE");
}

This code will not compile. Gives "Syntax error in condition at line 4, character 70"
According to the assert documentation , this is correct syntax. If you comment out the line with the assert, compiles fine. If you remove the ,string "NOPE" aspect, it compiles fine.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions