mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow dot in inline assembly identifiers.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
function f(a., x.b) -> t.b, b.. {}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// DeclarationError 3927: (74-76): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
// DeclarationError 3927: (78-81): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
// DeclarationError 3927: (86-89): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
// DeclarationError 3927: (91-94): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
@@ -0,0 +1,11 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
function f.() {}
|
||||
function g.f() {}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// DeclarationError 3927: (63-79): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
// DeclarationError 3927: (86-103): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
@@ -0,0 +1,11 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
function f() -> x, y, z {}
|
||||
let a., aa.b := f()
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// DeclarationError 3927: (100-102): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
// DeclarationError 3927: (104-108): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
@@ -0,0 +1,15 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
let a. := 2
|
||||
let a.. := 2
|
||||
let a.b := 2
|
||||
let a..b := 2
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// DeclarationError 3927: (67-69): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
// DeclarationError 3927: (85-88): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
// DeclarationError 3927: (104-107): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
// DeclarationError 3927: (123-127): User-defined identifiers in inline assembly cannot contain '.'.
|
||||
@@ -0,0 +1,9 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
let a, .a, aa.b := f()
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (70-71): Expected identifier but got '.'
|
||||
Reference in New Issue
Block a user