Skip to content

static_assert #8146

@leonardoalt

Description

@leonardoalt

require and assert can be used to write formal specs into Solidity, but many people don't because they automatically lead to extra bytecode increasing gas costs.
static_require and static_assert could be logical only, without code generation.
One variation would to also generate code if compiled in debug mode (or similar).

Metadata

Metadata

Assignees

No one assigned

    Labels

    high impactChanges are very prominent and affect users or the project in a major way.language design :rage4:Any changes to the language, e.g. new featuresmedium effortDefault level of effortmust have eventuallySomething we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.needs designThe proposal is too vague to be implemented right away

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions