mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 08:47:28 +01:00
Add via keyword and named args.
This commit is contained in:
1 parent
9719fab535
commit
06eaadb1d6
7 files changed
+86
-27
No files matched your search
+6
-1
@@ -136,8 +136,13 @@ func (c *checker) tcheckAssert(n *a.Assert) error {
|
||||
return fmt.Errorf("check: assert condition %q, of type %q, does not have a boolean type",
|
||||
cond.String(c.idMap), cond.MType().String(c.idMap))
|
||||
}
|
||||
for _, a := range n.Args() {
|
||||
if err := c.tcheckExpr(a.Arg().Value(), 0); err != nil {
|
||||
return err
|
||||
}
|
||||
a.SetTypeChecked()
|
||||
}
|
||||
// TODO: check that there are no side effects.
|
||||
// TODO: check the actual assertion.
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user