Skip to content

version pragma accepts partial string literals in any position #14826

@OmarTawfik

Description

@OmarTawfik

Considering the following example:

// all these are legal, and equivalent:
pragma solidity "0.8";
pragma solidity "0." 8;
pragma solidity "0" .8;
pragma solidity 0.8;

// same for single-quoted strings:
pragma solidity 0 '.' 8;
pragma solidity '0.8';

// they can also be used with other operators, mixed the raw syntax:
pragma solidity "0.7" - 0.8 || '0.9';

I wonder if this is intended? If not, what would be the correct/intended subset?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛low effortThere is not much implementation work to be done. The task is very easy or tiny.low impactChanges are not very noticeable or potential benefits are limited.must have eventuallySomething we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions