mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: allow a type to be used as a variant of multiple sum types
This commit is contained in:
@ -140,7 +140,7 @@ fn (p mut Parser) match_statement(is_expr bool) string {
|
||||
if is_sum_type {
|
||||
sum_child_type = p.get_type2().name
|
||||
tt := sum_child_type.all_after('_')
|
||||
p.gen('SumType_$tt')
|
||||
p.gen('SumType_${typ}_$tt')
|
||||
// println('got child $sum_child_type')
|
||||
p.register_var(Var{
|
||||
name: 'it'
|
||||
|
Reference in New Issue
Block a user