mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Issue 11610 : Replced typeError with fataTypeError in lines 390 and 406. Test file added in test/libsolidity/syntaxTests/calldata_struct_argument_with_internal_type_inside.sol
Issue : 11610 : Test cases updated, Changelog.md file updated to include change on 0.8.11
This commit is contained in:
-1
@@ -7,4 +7,3 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (132-140): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4061: (132-140): Type struct C.S is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
-1
@@ -6,4 +6,3 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (105-113): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4061: (105-113): Type struct C.S is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
@@ -5,4 +5,3 @@ contract Test {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (66-98): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4061: (66-98): Type mapping(uint256 => uint256)[] is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
@@ -3,4 +3,3 @@ contract A {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (29-59): Types containing (nested) mappings can only be parameters or return variables of internal or library functions. You can make the contract abstract to avoid this problem.
|
||||
// TypeError 4061: (29-59): Type mapping(uint256 => uint256) is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
struct S {
|
||||
function() a;
|
||||
}
|
||||
function f(S calldata) public {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (56-66): Internal type is not allowed for public or external functions.
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
struct S {
|
||||
function() a;
|
||||
}
|
||||
function f(S[2] calldata) public {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (56-69): Internal type is not allowed for public or external functions.
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
struct S {
|
||||
function() a;
|
||||
}
|
||||
constructor (S[2] storage) public {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 3644: (58-70): This parameter has a type that can only be used internally. You can make the contract abstract to avoid this problem.
|
||||
@@ -12,4 +12,3 @@ contract test {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (155-167): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4061: (155-167): Type struct test.S is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
-1
@@ -7,4 +7,3 @@ library a {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (149-157): Recursive structs can only be passed as storage pointers to libraries, not as memory objects to contract functions.
|
||||
// TypeError 4061: (149-157): Type struct a.b is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
-1
@@ -3,4 +3,3 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (29-61): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4061: (29-61): Type mapping(uint256 => uint256)[] is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
-1
@@ -3,4 +3,3 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (29-59): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4061: (29-59): Type mapping(uint256 => uint256) is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
-1
@@ -3,4 +3,3 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (29-57): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4061: (29-57): Type mapping(uint256 => uint256) is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
@@ -9,4 +9,3 @@ contract test {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (121-133): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4061: (121-133): Type struct test.S is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
@@ -4,4 +4,3 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (51-79): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4061: (51-79): Type mapping(uint256 => uint256) is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
@@ -5,4 +5,3 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (104-112): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4061: (104-112): Type struct C.S is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
-1
@@ -7,4 +7,3 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (148-156): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4061: (148-156): Type struct C.U is only valid in storage because it contains a (nested) mapping.
|
||||
|
||||
Reference in New Issue
Block a user