Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should have compiler error for assigning to an item in an uninitialized memory array #10002

Closed
mudgen opened this issue Oct 9, 2020 · 2 comments
Labels
closed due inactivity The issue/PR was automatically closed due to inactivity. language design :rage4: Any changes to the language, e.g. new features stale The issue/PR was marked as stale because it has been open for too long.
Projects

Comments

@mudgen
Copy link

mudgen commented Oct 9, 2020

The following code compiles without error but it seems to me that the compiler should throw an error because the generated runtime code does not work:

   function test() external pure returns (uint256[] memory _myArray) {
        _myArray[0] = 10;
        _myArray[1] = 12;
    }

It seems to me that it should be a compile error to assign a value to an item in an uninitialized memory array, because it doesn't work at runtime.

@chriseth chriseth added this to New issues in Solidity via automation Oct 12, 2020
@chriseth chriseth moved this from New issues to Icebox in Solidity Oct 12, 2020
@cameel cameel added feature language design :rage4: Any changes to the language, e.g. new features and removed feature labels Oct 15, 2020
@github-actions
Copy link

github-actions bot commented Mar 9, 2023

This issue has been marked as stale due to inactivity for the last 90 days.
It will be automatically closed in 7 days.

@github-actions github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Mar 9, 2023
@github-actions
Copy link

Hi everyone! This issue has been automatically closed due to inactivity.
If you think this issue is still relevant in the latest Solidity version and you have something to contribute, feel free to reopen.
However, unless the issue is a concrete proposal that can be implemented, we recommend starting a language discussion on the forum instead.

@github-actions github-actions bot added the closed due inactivity The issue/PR was automatically closed due to inactivity. label Mar 17, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 17, 2023
Solidity automation moved this from Icebox to Done Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed due inactivity The issue/PR was automatically closed due to inactivity. language design :rage4: Any changes to the language, e.g. new features stale The issue/PR was marked as stale because it has been open for too long.
Projects
No open projects
Solidity
  
Done
Development

No branches or pull requests

3 participants