diff --git a/vlib/v/ast/str.v b/vlib/v/ast/str.v index 38a561478e..06f65598b7 100644 --- a/vlib/v/ast/str.v +++ b/vlib/v/ast/str.v @@ -318,6 +318,9 @@ pub fn (x Expr) str() string { return '${x.expr.str()}.$x.field_name' } SizeOf { + if x.is_type { + return 'sizeof(Type($x.typ))' + } return 'sizeof($x.expr)' } OffsetOf {