tact-lang / tact

Tact compiler main repository
https://tact-lang.org
MIT License
280 stars 56 forks source link

Struct constructor parameters clash with FunC keywords #466

Closed anton-trunov closed 5 days ago

anton-trunov commented 6 days ago

Trying to compile the following

struct Foo {type: Int}        // or `forall: 42`, `int: 42`, etc.

contract Bar {
    f: Foo = Foo {type: 42};
}

would result in this FunC error message:

Func compilation error: ... formal parameter name expected instead of `type`
  ((int)) $Foo$_constructor_type(int type) inline;