mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Handle structs that contain structs.
This commit is contained in:
1 parent
b3c12e05cf
commit
86c6b79e1a
9 files changed
+263
-96
No files matched your search
@@ -127,9 +127,8 @@ func invert(tm *t.Map, n *a.Expr) (*a.Expr, error) {
|
||||
}
|
||||
|
||||
func bcheckField(tm *t.Map, n *a.Field) error {
|
||||
x := n.XType()
|
||||
for ; x.Inner() != nil; x = x.Inner() {
|
||||
}
|
||||
// TODO: check if x is a numeric type? What if n.XType() is "ptr T"?
|
||||
x := n.XType().Innermost()
|
||||
dv, nMin, nMax := zero, zero, zero
|
||||
if o := n.DefaultValue(); o != nil {
|
||||
dv = o.ConstValue()
|
||||
|
||||
Reference in new issue
Block a user