v.eval: show `sumtype or interface casts return void currently` only with -v
parent
23be53e2de
commit
adf353702e
|
@ -380,8 +380,10 @@ pub fn (mut e Eval) expr(expr ast.Expr, expecting ast.Type) Object {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if e.table.get_type_symbol(expr.typ).kind in [.interface_, .sum_type] {
|
} else if e.table.get_type_symbol(expr.typ).kind in [.interface_, .sum_type] {
|
||||||
|
if e.pref.is_verbose {
|
||||||
eprintln(util.formatted_error('warning:', 'sumtype or interface casts return void currently',
|
eprintln(util.formatted_error('warning:', 'sumtype or interface casts return void currently',
|
||||||
e.cur_file, expr.pos))
|
e.cur_file, expr.pos))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
e.error('unknown cast: ${e.table.get_type_symbol(expr.expr_type).str()} to ${e.table.get_type_symbol(expr.typ).str()}')
|
e.error('unknown cast: ${e.table.get_type_symbol(expr.expr_type).str()} to ${e.table.get_type_symbol(expr.typ).str()}')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue