version pragma accepts partial string literals in any position
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
Considering the following example:
```solidity
// 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!
Contributor guide
Research direction
The issue provides no file or test path. Reproduce the listed pragma examples, then trace how Solidity parses version pragmas and compare the accepted syntax with the intended grammar; done means an agreed subset is documented and the unwanted forms are rejected by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100