mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix crash when FunctionType has undeclared type as parameter
This commit is contained in:
parent
bc13365a7b
commit
210fee571f
@ -73,6 +73,7 @@ Bugfixes:
|
|||||||
* Code Generator: Fix allocation of byte arrays (zeroed out too much memory).
|
* Code Generator: Fix allocation of byte arrays (zeroed out too much memory).
|
||||||
* Fix NatSpec json output for `@notice` and `@dev` tags on contract definitions.
|
* Fix NatSpec json output for `@notice` and `@dev` tags on contract definitions.
|
||||||
* References Resolver: Enforce ``storage`` as data location for mappings.
|
* References Resolver: Enforce ``storage`` as data location for mappings.
|
||||||
|
* References Resolver: Report error instead of assertion fail when FunctionType has an undeclared type as parameter.
|
||||||
* Type Checker: Consider fixed size arrays when checking for recursive structs.
|
* Type Checker: Consider fixed size arrays when checking for recursive structs.
|
||||||
* Type System: Allow arbitrary exponents for literals with a mantissa of zero.
|
* Type System: Allow arbitrary exponents for literals with a mantissa of zero.
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ void ReferencesResolver::endVisit(UserDefinedTypeName const& _typeName)
|
|||||||
Declaration const* declaration = m_resolver.pathFromCurrentScope(_typeName.namePath());
|
Declaration const* declaration = m_resolver.pathFromCurrentScope(_typeName.namePath());
|
||||||
if (!declaration)
|
if (!declaration)
|
||||||
{
|
{
|
||||||
declarationError(_typeName.location(), "Identifier not found or not unique.");
|
fatalDeclarationError(_typeName.location(), "Identifier not found or not unique.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
contract test {
|
|
||||||
function f() public {
|
|
||||||
uintM something = 3;
|
|
||||||
intM should = 4;
|
|
||||||
bytesM fail = "now";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// ----
|
|
||||||
// DeclarationError: (50-55): Identifier not found or not unique.
|
|
||||||
// DeclarationError: (79-83): Identifier not found or not unique.
|
|
||||||
// DeclarationError: (104-110): Identifier not found or not unique.
|
|
@ -0,0 +1,7 @@
|
|||||||
|
contract test {
|
||||||
|
function f() public {
|
||||||
|
uintM something = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// DeclarationError: (50-55): Identifier not found or not unique.
|
@ -0,0 +1,7 @@
|
|||||||
|
contract test {
|
||||||
|
function f() public {
|
||||||
|
intM should = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// DeclarationError: (50-54): Identifier not found or not unique.
|
@ -0,0 +1,7 @@
|
|||||||
|
contract test {
|
||||||
|
function f() public {
|
||||||
|
bytesM fail = "now";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// DeclarationError: (50-56): Identifier not found or not unique.
|
@ -0,0 +1,5 @@
|
|||||||
|
contract C {
|
||||||
|
function a(function(Nested)) external pure {}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// DeclarationError: (37-43): Identifier not found or not unique.
|
@ -0,0 +1,5 @@
|
|||||||
|
contract C {
|
||||||
|
function a(function(Nested) external) external pure {}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// DeclarationError: (37-43): Identifier not found or not unique.
|
@ -0,0 +1,5 @@
|
|||||||
|
contract C {
|
||||||
|
function a(function(function(function(Nested)))) external pure {}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// DeclarationError: (55-61): Identifier not found or not unique.
|
Loading…
Reference in New Issue
Block a user