diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-31 00:41:34 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-31 02:50:06 +0800 |
commit | 6e23006937f583dcfe0ce1a356ea57f88865974f (patch) | |
tree | 7ebf5d8543845de1500264d43542397f2123eb4b /test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol | |
parent | deeca7bc5d968e90d65c3ce094ae1e93c3844637 (diff) | |
download | dexon-solidity-6e23006937f583dcfe0ce1a356ea57f88865974f.tar dexon-solidity-6e23006937f583dcfe0ce1a356ea57f88865974f.tar.gz dexon-solidity-6e23006937f583dcfe0ce1a356ea57f88865974f.tar.bz2 dexon-solidity-6e23006937f583dcfe0ce1a356ea57f88865974f.tar.lz dexon-solidity-6e23006937f583dcfe0ce1a356ea57f88865974f.tar.xz dexon-solidity-6e23006937f583dcfe0ce1a356ea57f88865974f.tar.zst dexon-solidity-6e23006937f583dcfe0ce1a356ea57f88865974f.zip |
Split out SolidityNameAndTypeResolution tests into SyntaxTests
Diffstat (limited to 'test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol new file mode 100644 index 00000000..4f185e4d --- /dev/null +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/535_address_overload_resolution.sol @@ -0,0 +1,22 @@ +contract C { + function balance() returns (uint) { + this.balance; // to avoid pureness warning + return 1; + } + function transfer(uint amount) { + address(this).transfer(amount); // to avoid pureness warning + } +} +contract D { + function f() { + var x = (new C()).balance(); + x; + (new C()).transfer(5); + } +} +// ---- +// Warning: (282-287): Use of the "var" keyword is deprecated. +// Warning: (17-127): No visibility specified. Defaulting to "public". +// Warning: (132-239): No visibility specified. Defaulting to "public". +// Warning: (259-358): No visibility specified. Defaulting to "public". +// Warning: (17-127): Function state mutability can be restricted to view |