Conversion of shorter string literals to longer fixed bytes is not disallowed as stated in the docs
Open
bug :bug:
documentation :book:
low effort
low impact
must have
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
## Page
https://docs.soliditylang.org/en/latest/types.html#conversions-between-literals-and-elementary-types
## Abstract
`bytes2 c = hex"12"; //` seems work fine in Remix with lastest version complier

## Pull request
Contributor guide
Research direction
Start with the “Conversions between literals and elementary types” page and reproduce `bytes2 c = hex"12";` in Remix using the latest compiler. Determine whether the compiler behavior or documentation is wrong, then verify that the documented rule and observed behavior agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- compilers, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100