mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v.ast: improve Expr.str() for sizeof(Type)
This commit is contained in:
parent
79a8e34e33
commit
c5884a5f4d
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user