From 31fa6a24df0e698a2c086a8efb7162fa13c061b8 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 17 May 2018 09:04:39 +0200 Subject: Move more parser tests to syntax tests --- test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol (limited to 'test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol') diff --git a/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol b/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol new file mode 100644 index 00000000..626e865e --- /dev/null +++ b/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol @@ -0,0 +1,8 @@ +contract c { + function f() { c[10] a = 7; uint8[10 * 2] x; } +} +// ---- +// Warning: (32-39): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning. +// Warning: (45-60): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning. +// TypeError: (32-43): Type int_const 7 is not implicitly convertible to expected type contract c[10] storage pointer. +// Warning: (45-60): Uninitialized storage pointer. Did you mean ' memory x'? -- cgit v1.2.3 From 2e0d019ef09ac4f168a4e528f8b4a051a942a479 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Mon, 2 Jul 2018 17:47:48 +0200 Subject: Adds default visibility specifier to syntax tests. --- test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol') diff --git a/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol b/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol index 626e865e..95ef66d4 100644 --- a/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol +++ b/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol @@ -1,8 +1,8 @@ contract c { - function f() { c[10] a = 7; uint8[10 * 2] x; } + function f() public { c[10] a = 7; uint8[10 * 2] x; } } // ---- -// Warning: (32-39): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning. -// Warning: (45-60): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning. -// TypeError: (32-43): Type int_const 7 is not implicitly convertible to expected type contract c[10] storage pointer. -// Warning: (45-60): Uninitialized storage pointer. Did you mean ' memory x'? +// Warning: (39-46): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning. +// Warning: (52-67): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning. +// TypeError: (39-50): Type int_const 7 is not implicitly convertible to expected type contract c[10] storage pointer. +// Warning: (52-67): Uninitialized storage pointer. Did you mean ' memory x'? -- cgit v1.2.3 From 46d6454b1f47e53c791d71aba26bb953ec667433 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 3 Jul 2018 15:10:39 +0200 Subject: Update tests. --- test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol') diff --git a/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol b/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol index 95ef66d4..2b35ffda 100644 --- a/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol +++ b/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol @@ -5,4 +5,4 @@ contract c { // Warning: (39-46): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning. // Warning: (52-67): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning. // TypeError: (39-50): Type int_const 7 is not implicitly convertible to expected type contract c[10] storage pointer. -// Warning: (52-67): Uninitialized storage pointer. Did you mean ' memory x'? +// DeclarationError: (52-67): Uninitialized storage pointer. Did you mean ' memory x'? -- cgit v1.2.3 From 8b4b8bdbae2f67445178ebe3b12d23bb4f46f9d2 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Wed, 11 Jul 2018 13:23:33 +0200 Subject: Update test wrt requiring storage locations. --- test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol') diff --git a/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol b/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol index 2b35ffda..4c1f96e6 100644 --- a/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol +++ b/test/libsolidity/syntaxTests/parsing/arrays_in_expressions.sol @@ -1,8 +1,6 @@ contract c { - function f() public { c[10] a = 7; uint8[10 * 2] x; } + function f() public { c[10] storage a = 7; uint8[10 * 2] storage x; } } // ---- -// Warning: (39-46): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning. -// Warning: (52-67): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning. -// TypeError: (39-50): Type int_const 7 is not implicitly convertible to expected type contract c[10] storage pointer. -// DeclarationError: (52-67): Uninitialized storage pointer. Did you mean ' memory x'? +// TypeError: (39-58): Type int_const 7 is not implicitly convertible to expected type contract c[10] storage pointer. +// DeclarationError: (60-83): Uninitialized storage pointer. -- cgit v1.2.3