Skip to content

Commit 60a17c0

Browse files
Add tests
1 parent 14cb651 commit 60a17c0

File tree

8 files changed

+53
-0
lines changed

8 files changed

+53
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
enum error { layout, at }
2+
/// ----
3+
// ----
4+
// Warning 6335: (0-25): "error" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
5+
// Warning 6335: (13-19): "layout" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
6+
// Warning 6335: (21-23): "at" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
==== Source: a ====
2+
contract A {}
3+
==== Source: b ====
4+
import {A as super} from "a";
5+
contract C is super {}
6+
// ----
7+
// DeclarationError 3726: (b:13-18): The name "super" is reserved.
8+
// Warning 2319: (b:13-18): This declaration shadows a builtin symbol.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
==== Source: a ====
2+
uint constant CONST = 10;
3+
==== Source: b ====
4+
import "a" as super;
5+
contract C {
6+
uint x = super.CONST;
7+
}
8+
// ----
9+
// DeclarationError 3726: (b:0-20): The name "super" is reserved.
10+
// Warning 6335: (b:0-20): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
11+
// Warning 2319: (b:0-20): This declaration shadows a builtin symbol.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
contract C {
2+
function f() pure public {
3+
assembly {
4+
function error (a, b , c ) -> y,x,z {
5+
}
6+
}
7+
}
8+
}
9+
// ----
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function f() pure {
2+
assembly {
3+
let layout := 1
4+
}
5+
}
6+
// ----
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
struct error {
2+
uint layout;
3+
}
4+
// ----
5+
// Warning 6335: (0-33): "error" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
6+
// Warning 6335: (19-30): "layout" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
type error is int;
2+
// ----
3+
// Warning 6335: (0-18): "error" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
contract C {
2+
uint leave = 1;
3+
}
4+
// ----

0 commit comments

Comments
 (0)