Skip to content

Contract dependencies are not properly calculated when library-internal functions are used #9565

@chriseth

Description

@chriseth

The following code leads to an internal error because we have a circular dependency between D and C but the compiler does not detect it in the analysis phase:

library L{
    function f() internal {
        new C();
    }
}

contract D {
    function f() public {
        L.f();
    }
}
contract C {
    constructor() { new D(); }
}

The same behaviour can be observed if L.f is replaced by a free function.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions