mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Properly cope with constructor headers.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
contract C {
|
||||
// Fool parser into parsing a constructor as a function type.
|
||||
constructor() x;
|
||||
}
|
||||
// ----
|
||||
// Warning: (83-99): Modifiers of functions without implementation are ignored.
|
||||
// DeclarationError: (97-98): Undeclared identifier.
|
||||
@@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
// Fool parser into parsing a constructor as a function type.
|
||||
function f() {
|
||||
constructor() x;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError: (118-118): Expected token Semicolon got 'Identifier'
|
||||
Reference in New Issue
Block a user