Fix #8427: Promoted typeError to fatalTypeError in ReferencesResolver::endVisit(UserDefinedTypeName).

This commit is contained in:
a3d4
2020-03-25 02:51:34 +01:00
parent cfeea542b5
commit 339f3ca32c
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.