Skip to content

Results of math Functions Should be Assignable as Constants #2354

@NotsoanoNimus

Description

@NotsoanoNimus

This may be a difficult issue due to the way the @LinkMath attribute works (I literally have no idea), but I'm trying to do the following:

module some_module { F };

const A_CONST = 12 + 2 * math::log2(F / 25);

which results in:

16: const MAX_ROUNDS = 12 + 2 * math::log2(F / 25);
                                ^^^^^^^^^^^^^^^^^^
(localtesting.c3:16:29) Error: Cannot call macro with '@links' outside of a function.

It seems this should be easily assignable into a constant value given the context.

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingFixed needs testingNeeds verification / testing that it now works

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions