mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix #8427: Promoted typeError to fatalTypeError in ReferencesResolver::endVisit(UserDefinedTypeName).
This commit is contained in:
parent
cfeea542b5
commit
339f3ca32c
@ -8,7 +8,8 @@ Compiler Features:
|
|||||||
|
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
* Inline Assembly: Fix internal error when accessing incorrect constant variables.
|
* Inline Assembly: Fix internal error when accessing invalid constant variables.
|
||||||
|
* Reference Resolver: Fix internal error when accessing invalid struct members.
|
||||||
* Inheritance: Allow public state variables to override functions with dynamic memory types in their return values.
|
* Inheritance: Allow public state variables to override functions with dynamic memory types in their return values.
|
||||||
* JSON AST: Always add pointer suffix for memory reference types.
|
* JSON AST: Always add pointer suffix for memory reference types.
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ void ReferencesResolver::endVisit(UserDefinedTypeName const& _typeName)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
_typeName.annotation().type = TypeProvider::emptyTuple();
|
_typeName.annotation().type = TypeProvider::emptyTuple();
|
||||||
typeError(_typeName.location(), "Name has to refer to a struct, enum or contract.");
|
fatalTypeError(_typeName.location(), "Name has to refer to a struct, enum or contract.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user