aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/constructor_this.sol
blob: 9d22a1618a355597e0521fe5b2703ca657a9ac63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
contract C {
    function f() public pure {}
    constructor() public {
        C c = this;
        c.f(); // this does not warn now, but should warn in the future
        this.f();
        (this).f();
    }
}
// ----
// Warning: (172-176): "this" used in constructor. Note that external functions of a contract cannot be called while it is being constructed.
// Warning: (191-195): "this" used in constructor. Note that external functions of a contract cannot be called while it is being constructed.