Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusaaguiar committed Apr 8, 2024
1 parent 1ea64d6 commit 7bea970
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
@@ -0,0 +1,5 @@
contract test {
function f(bytes transient) external;
}
// ----
// TypeError 6651: (28-43): Data location must be "memory" or "calldata" for parameter in external function, but none was given.
Empty file.
@@ -0,0 +1,8 @@
contract C {
uint transient x;
function f() public view returns(uint) {
return x;
}
}
// ----
// TypeError 6651: (14-30): Data location can only be specified for array, struct or mapping types, but "transient" was given.
@@ -0,0 +1,10 @@
contract C {
function transient() public pure { }
}
contract D {
function f() public pure returns (uint) {
uint transient = 1;
return transient;
}
}
// ----
@@ -0,0 +1,14 @@
contract C {
function f() public pure returns (uint) {
uint transient = 1;
uint transient x = transient + 2;
return x;
}
function g() public pure returns (uint) {
uint transient transient = 9;
return transient;
}
}
// ----
// TypeError 6651: (80-96): Data location can only be specified for array, struct or mapping types, but "transient" was given.
// TypeError 6651: (174-198): Data location can only be specified for array, struct or mapping types, but "transient" was given.

0 comments on commit 7bea970

Please sign in to comment.