diff options
author | Erik Kundt <bitshift@posteo.org> | 2018-03-23 22:09:45 +0800 |
---|---|---|
committer | Erik Kundt <bitshift@posteo.org> | 2018-04-03 17:16:50 +0800 |
commit | 601659c3844767686a324ea363498e85320c92b1 (patch) | |
tree | 87527e9bc7c3ee191d1b560c60521f2db3f8156d /test/libsolidity/syntaxTests | |
parent | 8fe1cfb12ef49a74eaebed56d160e88cfd9a4de2 (diff) | |
download | dexon-solidity-601659c3844767686a324ea363498e85320c92b1.tar dexon-solidity-601659c3844767686a324ea363498e85320c92b1.tar.gz dexon-solidity-601659c3844767686a324ea363498e85320c92b1.tar.bz2 dexon-solidity-601659c3844767686a324ea363498e85320c92b1.tar.lz dexon-solidity-601659c3844767686a324ea363498e85320c92b1.tar.xz dexon-solidity-601659c3844767686a324ea363498e85320c92b1.tar.zst dexon-solidity-601659c3844767686a324ea363498e85320c92b1.zip |
Moves all interface function visibility related tests.
Diffstat (limited to 'test/libsolidity/syntaxTests')
5 files changed, 26 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_external050.sol b/test/libsolidity/syntaxTests/visibility/interface/function_external050.sol new file mode 100644 index 00000000..3f0a9aca --- /dev/null +++ b/test/libsolidity/syntaxTests/visibility/interface/function_external050.sol @@ -0,0 +1,5 @@ +pragma experimental "v0.5.0"; +interface I { + function f() external; +} +// ---- diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_internal.sol b/test/libsolidity/syntaxTests/visibility/interface/function_internal.sol new file mode 100644 index 00000000..a1cf5246 --- /dev/null +++ b/test/libsolidity/syntaxTests/visibility/interface/function_internal.sol @@ -0,0 +1,5 @@ +interface I { + function f() internal; +} +// ---- +// TypeError: Functions in interfaces cannot be internal or private. diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_private.sol b/test/libsolidity/syntaxTests/visibility/interface/function_private.sol new file mode 100644 index 00000000..887ebd4b --- /dev/null +++ b/test/libsolidity/syntaxTests/visibility/interface/function_private.sol @@ -0,0 +1,5 @@ +interface I { + function f() private; +} +// ---- +// TypeError: Functions in interfaces cannot be internal or private. diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_public.sol b/test/libsolidity/syntaxTests/visibility/interface/function_public.sol new file mode 100644 index 00000000..146d4f5b --- /dev/null +++ b/test/libsolidity/syntaxTests/visibility/interface/function_public.sol @@ -0,0 +1,5 @@ +interface I { + function f() public; +} +// ---- +// Warning: Functions in interfaces should be declared external.
\ No newline at end of file diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_public050.sol b/test/libsolidity/syntaxTests/visibility/interface/function_public050.sol new file mode 100644 index 00000000..f957f0b4 --- /dev/null +++ b/test/libsolidity/syntaxTests/visibility/interface/function_public050.sol @@ -0,0 +1,6 @@ +pragma experimental "v0.5.0"; +interface I { + function f() public; +} +// ---- +// TypeError: Functions in interfaces must be declared external.
\ No newline at end of file |