You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TypeError 9479: (84-90): The suffixes ".offset", ".slot" and ".length" can only be used with variables or the suffix "objectName" can be used with a contract name identifier.
Copy file name to clipboardexpand all lines: test/libsolidity/syntaxTests/viewPureChecker/eof/inline_assembly_instructions_allowed.sol
+9-5
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
contractB {}
2
+
1
3
contractC {
2
4
function f() public {
3
5
assembly {
@@ -71,6 +73,8 @@ contract C {
71
73
pop(tload(0))
72
74
tstore(0, 0)
73
75
76
+
pop(eofcreate(B.objectName, 0, 0, 0, 0))
77
+
74
78
// NOTE: msize() is allowed only with optimizer disabled
75
79
//pop(msize())
76
80
}
@@ -79,8 +83,8 @@ contract C {
79
83
// ====
80
84
// bytecodeFormat: >=EOFv1
81
85
// ----
82
-
// Warning 2394: (1970-1976): Transient storage as defined by EIP-1153 can break the composability of smart contracts: Since transient storage is cleared only at the end of the transaction and not at the end of the outermost call frame to the contract within a transaction, your contract may unintentionally misbehave when invoked multiple times in a complex transaction. To avoid this, be sure to clear all transient storage at the end of any call to your contract. The use of transient storage for reentrancy guards that are cleared at the end of the call is safe.
83
-
// Warning 5740: (89-1400): Unreachable code.
84
-
// Warning 5740: (1413-1425): Unreachable code.
85
-
// Warning 5740: (1438-1447): Unreachable code.
86
-
// Warning 5740: (1460-1982): Unreachable code.
86
+
// Warning 2394: (1985-1991): Transient storage as defined by EIP-1153 can break the composability of smart contracts: Since transient storage is cleared only at the end of the transaction and not at the end of the outermost call frame to the contract within a transaction, your contract may unintentionally misbehave when invoked multiple times in a complex transaction. To avoid this, be sure to clear all transient storage at the end of any call to your contract. The use of transient storage for reentrancy guards that are cleared at the end of the call is safe.
Copy file name to clipboardexpand all lines: test/libsolidity/syntaxTests/viewPureChecker/eof/inline_assembly_instructions_disallowed.sol
+4-7
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,6 @@ contract C {
6
6
memoryguard(0)
7
7
verbatim_1i_1o(hex"600202", 0)
8
8
9
-
pop(eofcreate("a", 0, 0, 0, 0))
10
9
returncontract("a", 0, 0, 0)
11
10
pop(auxdataloadn(0))
12
11
@@ -17,12 +16,10 @@ contract C {
17
16
// ====
18
17
// bytecodeFormat: >=EOFv1
19
18
// ----
20
-
// SyntaxError 6553: (184-449): The msize instruction cannot be used when the Yul optimizer is activated because it can change its semantics. Either disable the Yul optimizer or do not use the instruction.
19
+
// SyntaxError 6553: (184-405): The msize instruction cannot be used when the Yul optimizer is activated because it can change its semantics. Either disable the Yul optimizer or do not use the instruction.
21
20
// DeclarationError 4619: (207-219): Function "linkersymbol" not found.
22
21
// DeclarationError 4619: (237-248): Function "memoryguard" not found.
23
22
// DeclarationError 4619: (264-278): Function "verbatim_1i_1o" not found.
24
-
// DeclarationError 4619: (312-321): Function "eofcreate" not found.
25
-
// TypeError 3950: (312-338): Expected expression to evaluate to one value, but got 0 values instead.
26
-
// DeclarationError 4619: (352-366): Function "returncontract" not found.
27
-
// DeclarationError 4619: (397-409): Function "auxdataloadn" not found.
28
-
// TypeError 3950: (397-412): Expected expression to evaluate to one value, but got 0 values instead.
23
+
// DeclarationError 4619: (308-322): Function "returncontract" not found.
24
+
// DeclarationError 4619: (353-365): Function "auxdataloadn" not found.
25
+
// TypeError 3950: (353-368): Expected expression to evaluate to one value, but got 0 values instead.
// This one is disallowed too but the error suppresses other errors.
35
38
//pop(msize())
@@ -39,33 +42,34 @@ contract C {
39
42
// ====
40
43
// bytecodeFormat: >=EOFv1
41
44
// ----
42
-
// Warning 2394: (781-787): Transient storage as defined by EIP-1153 can break the composability of smart contracts: Since transient storage is cleared only at the end of the transaction and not at the end of the outermost call frame to the contract within a transaction, your contract may unintentionally misbehave when invoked multiple times in a complex transaction. To avoid this, be sure to clear all transient storage at the end of any call to your contract. The use of transient storage for reentrancy guards that are cleared at the end of the call is safe.
43
-
// TypeError 2527: (79-87): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
44
-
// TypeError 8961: (101-113): Function cannot be declared as pure because this expression (potentially) modifies the state.
45
-
// TypeError 2527: (130-139): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
46
-
// TypeError 2527: (157-167): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
47
-
// TypeError 2527: (185-193): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
48
-
// TypeError 2527: (211-222): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
49
-
// TypeError 8961: (240-259): Function cannot be declared as pure because this expression (potentially) modifies the state.
50
-
// TypeError 2527: (277-299): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
51
-
// TypeError 8961: (317-341): Function cannot be declared as pure because this expression (potentially) modifies the state.
52
-
// TypeError 8961: (355-365): Function cannot be declared as pure because this expression (potentially) modifies the state.
53
-
// TypeError 8961: (378-391): Function cannot be declared as pure because this expression (potentially) modifies the state.
54
-
// TypeError 8961: (404-420): Function cannot be declared as pure because this expression (potentially) modifies the state.
55
-
// TypeError 8961: (433-452): Function cannot be declared as pure because this expression (potentially) modifies the state.
56
-
// TypeError 8961: (465-487): Function cannot be declared as pure because this expression (potentially) modifies the state.
57
-
// TypeError 2527: (504-512): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
58
-
// TypeError 2527: (530-540): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
59
-
// TypeError 2527: (558-570): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
60
-
// TypeError 2527: (588-598): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
61
-
// TypeError 2527: (616-627): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
62
-
// TypeError 2527: (645-653): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
63
-
// TypeError 2527: (671-681): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
64
-
// TypeError 2527: (699-710): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
65
-
// TypeError 2527: (728-741): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
66
-
// TypeError 2527: (759-767): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
67
-
// TypeError 8961: (781-793): Function cannot be declared as pure because this expression (potentially) modifies the state.
68
-
// TypeError 2527: (810-823): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
69
-
// TypeError 2527: (841-850): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
70
-
// TypeError 2527: (868-877): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
71
-
// TypeError 2527: (895-907): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
45
+
// Warning 2394: (796-802): Transient storage as defined by EIP-1153 can break the composability of smart contracts: Since transient storage is cleared only at the end of the transaction and not at the end of the outermost call frame to the contract within a transaction, your contract may unintentionally misbehave when invoked multiple times in a complex transaction. To avoid this, be sure to clear all transient storage at the end of any call to your contract. The use of transient storage for reentrancy guards that are cleared at the end of the call is safe.
46
+
// TypeError 2527: (94-102): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
47
+
// TypeError 8961: (116-128): Function cannot be declared as pure because this expression (potentially) modifies the state.
48
+
// TypeError 2527: (145-154): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
49
+
// TypeError 2527: (172-182): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
50
+
// TypeError 2527: (200-208): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
51
+
// TypeError 2527: (226-237): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
52
+
// TypeError 8961: (255-274): Function cannot be declared as pure because this expression (potentially) modifies the state.
53
+
// TypeError 2527: (292-314): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
54
+
// TypeError 8961: (332-356): Function cannot be declared as pure because this expression (potentially) modifies the state.
55
+
// TypeError 8961: (370-380): Function cannot be declared as pure because this expression (potentially) modifies the state.
56
+
// TypeError 8961: (393-406): Function cannot be declared as pure because this expression (potentially) modifies the state.
57
+
// TypeError 8961: (419-435): Function cannot be declared as pure because this expression (potentially) modifies the state.
58
+
// TypeError 8961: (448-467): Function cannot be declared as pure because this expression (potentially) modifies the state.
59
+
// TypeError 8961: (480-502): Function cannot be declared as pure because this expression (potentially) modifies the state.
60
+
// TypeError 2527: (519-527): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
61
+
// TypeError 2527: (545-555): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
62
+
// TypeError 2527: (573-585): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
63
+
// TypeError 2527: (603-613): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
64
+
// TypeError 2527: (631-642): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
65
+
// TypeError 2527: (660-668): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
66
+
// TypeError 2527: (686-696): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
67
+
// TypeError 2527: (714-725): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
68
+
// TypeError 2527: (743-756): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
69
+
// TypeError 2527: (774-782): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
70
+
// TypeError 8961: (796-808): Function cannot be declared as pure because this expression (potentially) modifies the state.
71
+
// TypeError 2527: (825-838): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
72
+
// TypeError 2527: (856-865): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
73
+
// TypeError 2527: (883-892): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
74
+
// TypeError 2527: (910-922): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
75
+
// TypeError 8961: (940-975): Function cannot be declared as pure because this expression (potentially) modifies the state.
0 commit comments