argotorg / argotorg/solidity

Conversion of shorter string literals to longer fixed bytes is not disallowed as stated in the docs

Open
#13,620 3 comments 0 reactions 0 assignees View on GitHub
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

![1665374593152](https://user-images.githubusercontent.com/11495469/194797804-8e4a7f20-0ca4-4db5-95b0-1d5edab8ee65.png)

## Pull request

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.