mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 00:47:28 +01:00
Drop the "= RHS" out of "var x T = RHS"
This commit is contained in:
1 parent
cbe19f50e0
commit
6dc68950c0
7 files changed
+20
-68
No files matched your search
+1
-13
@@ -193,19 +193,7 @@ func (q *checker) tcheckStatement(n *a.Node) error {
|
||||
if n.XType().AsNode().MType() == nil {
|
||||
return fmt.Errorf("check: internal error: unchecked type expression %q", n.XType().Str(q.tm))
|
||||
}
|
||||
if value := n.Value(); value != nil {
|
||||
if err := q.tcheckExpr(value, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
lTyp := n.XType()
|
||||
rTyp := value.MType()
|
||||
if err := q.tcheckEq(n.Name(), nil, lTyp, value, rTyp); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
} else {
|
||||
// TODO: check that the default zero value is assignable to n.XType().
|
||||
}
|
||||
// TODO: check that the default zero value is assignable to n.XType().
|
||||
|
||||
case a.KWhile:
|
||||
n := n.AsWhile()
|
||||
|
||||
Reference in new issue
Block a user