Merge pull request #8522 from a3d4/fix-8427-ast-types-compiler-error

Promoted typeError to fatalTypeError in ReferencesResolver
This commit is contained in:
chriseth
2020-03-25 11:23:00 +01:00
committed by GitHub
4 changed files with 18 additions and 2 deletions
@@ -0,0 +1,7 @@
contract C {
struct S {t t;}
function f(function(S memory) external) public {}
}
// ----
// TypeError: (25-26): Name has to refer to a struct, enum or contract.
// TypeError: (53-61): Internal type cannot be used for external function type.
@@ -0,0 +1,8 @@
contract C {
function f() public {}
struct S {f x;}
function g(function(S memory) external) public {}
}
// ----
// TypeError: (50-51): Name has to refer to a struct, enum or contract.
// TypeError: (78-86): Internal type cannot be used for external function type.