Merge pull request #4412 from ethereum/v050-reference-resolver-errorTypeForLoose

[BREAKING] permanently set errorTypeForLoose from Warning to SyntaxError
This commit is contained in:
Christian Parpart
2018-08-03 19:30:33 +02:00
committed by GitHub
22 changed files with 38 additions and 275 deletions
@@ -11,6 +11,6 @@ contract C {
}
// ----
// TypeError: (87-88): Expected 1 arguments but got 0.
// Warning: (87-90): Top-level expressions are not supposed to return values (this expression returns -1 values). Use ``pop()`` or assign them.
// SyntaxError: (87-90): Top-level expressions are not supposed to return values (this expression returns -1 values). Use ``pop()`` or assign them.
// TypeError: (108-109): Expected 1 arguments but got 2.
// Warning: (108-115): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
// SyntaxError: (108-115): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
@@ -8,6 +8,6 @@ contract C {
}
}
// ----
// Warning: (63-64): The use of labels is deprecated. Please use "if", "switch", "for" or function calls instead.
// Warning: (63-64): Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
// SyntaxError: (63-64): The use of labels is disallowed. Please use "if", "switch", "for" or function calls instead.
// SyntaxError: (63-64): Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
// TypeError: (73-74): Attempt to call label instead of function.
@@ -6,5 +6,5 @@ contract test {
}
}
// ----
// Warning: (73-74): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
// SyntaxError: (73-74): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
// DeclarationError: (59-84): Unbalanced stack at the end of a block: 1 surplus item(s).
@@ -6,5 +6,5 @@ contract test {
}
}
// ----
// Warning: (73-76): The use of non-functional instructions is deprecated. Please use functional notation instead.
// SyntaxError: (73-76): The use of non-functional instructions is disallowed. Please use functional notation instead.
// DeclarationError: (59-86): Unbalanced stack at the end of a block: 1 missing item(s).
@@ -1,11 +0,0 @@
pragma experimental "v0.5.0";
contract C {
function f() pure public {
assembly {
1
}
}
}
// ----
// SyntaxError: (105-106): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
// DeclarationError: (91-116): Unbalanced stack at the end of a block: 1 surplus item(s).
@@ -6,5 +6,5 @@ contract C {
}
}
// ----
// Warning: (75-76): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
// SyntaxError: (75-76): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
// DeclarationError: (61-86): Unbalanced stack at the end of a block: 1 surplus item(s).
@@ -1,12 +0,0 @@
pragma experimental "v0.5.0";
contract C {
function f() view public {
assembly {
address
pop
}
}
}
// ----
// SyntaxError: (105-112): The use of non-functional instructions is deprecated. Please use functional notation instead.
// SyntaxError: (125-128): The use of non-functional instructions is deprecated. Please use functional notation instead.
@@ -7,5 +7,5 @@ contract C {
}
}
// ----
// Warning: (75-82): The use of non-functional instructions is deprecated. Please use functional notation instead.
// Warning: (95-98): The use of non-functional instructions is deprecated. Please use functional notation instead.
// SyntaxError: (75-82): The use of non-functional instructions is disallowed. Please use functional notation instead.
// SyntaxError: (95-98): The use of non-functional instructions is disallowed. Please use functional notation instead.
@@ -1,11 +0,0 @@
pragma experimental "v0.5.0";
contract C {
function f() pure public {
assembly {
label:
}
}
}
// ----
// SyntaxError: (105-110): The use of labels is deprecated. Please use "if", "switch", "for" or function calls instead.
// SyntaxError: (105-110): Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
@@ -6,5 +6,5 @@ contract C {
}
}
// ----
// Warning: (75-80): The use of labels is deprecated. Please use "if", "switch", "for" or function calls instead.
// Warning: (75-80): Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
// SyntaxError: (75-80): The use of labels is disallowed. Please use "if", "switch", "for" or function calls instead.
// SyntaxError: (75-80): Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
@@ -6,5 +6,4 @@ contract C {
}
}
// ----
// Warning: (75-82): Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
// TypeError: (75-82): Function declared as pure, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// SyntaxError: (75-82): Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
@@ -6,5 +6,5 @@ contract C {
}
}
// ----
// Warning: (75-83): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
// SyntaxError: (75-83): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
// DeclarationError: (61-93): Unbalanced stack at the end of a block: 1 surplus item(s).
@@ -1,7 +0,0 @@
contract C {
function k() public {
assembly { jump(2) }
}
}
// ----
// Warning: (58-65): Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
@@ -1,8 +0,0 @@
contract C {
function k() public view {
assembly { jump(2) }
}
}
// ----
// Warning: (63-70): Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
// TypeError: (63-70): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.