diff options
Merge pull request #3752 from ethereum/fixStateVariableParsing
Fix state variable parsing
Diffstat (limited to 'test/libsolidity/syntaxTests/functionTypes/valid_function_type_variables.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/functionTypes/valid_function_type_variables.sol | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/functionTypes/valid_function_type_variables.sol b/test/libsolidity/syntaxTests/functionTypes/valid_function_type_variables.sol new file mode 100644 index 00000000..10c6767c --- /dev/null +++ b/test/libsolidity/syntaxTests/functionTypes/valid_function_type_variables.sol @@ -0,0 +1,23 @@ +contract test { + function fa(uint) {} + function fb(uint) internal {} + function fc(uint) internal {} + function fd(uint) external {} + function fe(uint) external {} + function ff(uint) internal {} + function fg(uint) internal pure {} + function fh(uint) pure internal {} + + function(uint) a = fa; + function(uint) internal b = fb; // (explicit internal applies to the function type) + function(uint) internal internal c = fc; + function(uint) external d = this.fd; + function(uint) external internal e = this.fe; + function(uint) internal public f = ff; + function(uint) internal pure public g = fg; + function(uint) pure internal public h = fh; +} +// ---- +// TypeError: (545-582): Internal or recursive type is not allowed for public state variables. +// TypeError: (588-630): Internal or recursive type is not allowed for public state variables. +// TypeError: (636-678): Internal or recursive type is not allowed for public state variables. |