mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: fix maps with aliases as key (#9900)
This commit is contained in:
@ -606,6 +606,19 @@ fn test_int_keys() {
|
||||
m3.delete(1)
|
||||
}
|
||||
|
||||
enum Color {
|
||||
red
|
||||
green
|
||||
blue
|
||||
}
|
||||
|
||||
type ColorAlias = Color
|
||||
|
||||
fn test_alias_enum() {
|
||||
mut m := map[ColorAlias]string{}
|
||||
m[Color.red] = 'hi'
|
||||
}
|
||||
|
||||
fn test_voidptr_keys() {
|
||||
mut m := map[voidptr]string{}
|
||||
v := 5
|
||||
|
Reference in New Issue
Block a user