argotorg / argotorg/solidity

[TypeChecker] ICE in spurious dragon due to unset return parameter decoding type in recursive library function call with a return function type

Open
#12,305 2 comments 0 reactions 0 assignees View on GitHub
bug :bug: low effort low impact must have eventually should report better error
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
2d 19h
Merged PRs (30d)
29

Description

```
library L {
function f() returns (function() r) {
L.f();
}
}
```

throws

https://github.com/ethereum/solidity/blob/defc74c8a248585b9fe1ddc8a10d10f11c92c052/libsolidity/ast/Types.cpp#L2877

Repro:

```
$ solc --evm-version spuriousDragon test.sol
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the ICE with `solc --evm-version spuriousDragon test.sol` using the recursive library example. Start at the referenced `libsolidity/ast/Types.cpp` location around line 2877 and trace the return-function type decoding path. Done means the example no longer triggers an internal compiler error, with regression coverage for the case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.