clawchain/solar/tests/ui/overrides/overrides.stderr

126 lines
7.9 KiB
Plaintext

error[9456]: overriding function is missing `override` specifier
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function mustOverride() public returns (uint) { return 100; }
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╰╴
note: overridden function is here
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function mustOverride() public virtual returns (uint) { return 1; }
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╰ help: add `override` to the function signature
error[4334]: cannot override non-virtual function
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function notVirtual() public returns (uint) { return 2; }
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╰╴
note: overriding function is here
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function notVirtual() public override returns (uint) { return 200; }
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╰ help: add `virtual` to the base function to allow overriding
error[4327]: Function needs to specify overridden contracts `Base` and `Base2`
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function mustOverride() public override returns (uint) { return 300; }
╰╴ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
error[7792]: Function has override specified but does not override anything
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function noBase() public override returns (uint) { return 400; }
╰╴ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
error[6480]: derived contract must override function `mustOverride`
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ contract Bad5 is Base, Base2 {}
│ ━━━━
│
├ note: two or more base classes define function with same name and parameter types
╰ note: defined in: `Base`, `Base2`
error[3656]: contract `Bad6` has unimplemented functions
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ contract Bad6 is IBase {}
│ ┬─────── ━━━━
│ │
│ help: mark the contract as abstract: `abstract contract`
╰╴
note: unimplemented function `interfaceFn` defined in `IBase`
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function interfaceFn() external returns (uint);
╰╴ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
error[9098]: overriding function changes visibility from `external` to `internal`
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function externalFn() internal override returns (uint) { return 500; }
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╰╴
note: overridden function is here
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function externalFn() external virtual returns (uint) { return 5; }
╰╴ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
error[6959]: overriding function changes state mutability from `view` to `nonpayable`
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function viewFn() public override returns (uint) { return 600; }
╰╴ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
error[6959]: overriding function changes state mutability from `payable` to `nonpayable`
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function payableFn() public override returns (uint) { return 700; }
╰╴ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
error[4822]: overriding function has different return types
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function mustOverride() public override returns (int) { return 800; }
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╰╴
note: overridden function is here
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function mustOverride() public virtual returns (uint) { return 1; }
╰╴ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
error[7723]: parameter data locations differ when overriding non-external function
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function foo(uint[] calldata x) public override returns (uint[] memory) { return x; }
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╰╴
note: overridden function is here
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function foo(uint[] memory x) public virtual returns (uint[] memory) { return x; }
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╰ note: data locations must match when overriding non-external functions
error[1443]: return variable data locations differ when overriding non-external function
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function foo(uint[] memory x) public override returns (uint[] calldata) {}
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╰╴
note: overridden function is here
╭▸ ROOT/tests/ui/overrides/overrides.sol:LL:CC
│
LL │ function foo(uint[] memory x) public virtual returns (uint[] memory) { return x; }
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╰ note: data locations must match when overriding non-external functions
error: aborting due to 12 previous errors