mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: resolve optional enum type
This commit is contained in:
@@ -119,6 +119,9 @@ int typ;
|
||||
}
|
||||
|
||||
fn (p mut Parser) check_enum_member_access() {
|
||||
if p.expected_type.starts_with('Option_') {
|
||||
p.expected_type = p.expected_type[7..]
|
||||
}
|
||||
T := p.find_type(p.expected_type)
|
||||
if T.cat == .enum_ {
|
||||
p.check(.dot)
|
||||
|
||||
Reference in New Issue
Block a user