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
contract Test {
struct Test {
uint x;
}
function main() public {
this;
}
}
The type string of this is contract Test. When trying to parse that however the typestring parser will fail with the following exception:
Error: Couldn't find ContractDefinition Test
at makeUserDefinedType (src/types/typeStrings/typeString_parser.ts:153:15)
at peg$c204 (src/types/typeStrings/typeString_parser.ts:636:18)
at peg$parseUserDefinedType (src/types/typeStrings/typeString_parser.ts:4380:24)
at peg$parseSimpleType (src/types/typeStrings/typeString_parser.ts:3685:30)
at peg$parseNonArrPtrType (src/types/typeStrings/typeString_parser.ts:5367:12)
at peg$parseArrayPtrType (src/types/typeStrings/typeString_parser.ts:5391:10)
at peg$parseType (src/types/typeStrings/typeString_parser.ts:5655:20)
at peg$parseStart (src/types/typeStrings/typeString_parser.ts:901:12)
at peg$parse (src/types/typeStrings/typeString_parser.ts:5667:16)
at getNodeType (src/types/typeStrings/typeString_parser.ts:109:17)
at Context.<anonymous> (test/integration/types/typestrings.spec.ts:159:53)
This is due to the fact that in normal resolving logic the Test struct shadows the contract definition for Test.
Since we are planing on deprecating the typestring parser, moving it under test/ and only using it to test the correctness of InferType we might not fix this edge case, unless there's demand for it.
The text was updated successfully, but these errors were encountered:
Given the following code:
The type string of
this
iscontract Test
. When trying to parse that however the typestring parser will fail with the following exception:This is due to the fact that in normal resolving logic the
Test
struct shadows the contract definition forTest
.Since we are planing on deprecating the typestring parser, moving it under
test/
and only using it to test the correctness ofInferType
we might not fix this edge case, unless there's demand for it.The text was updated successfully, but these errors were encountered: