mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 08:47:56 +01:00
Drop the unused ref and deref operators
This commit is contained in:
1 parent
97bcdded0d
commit
1c1ce9b19f
6 files changed
+6
-35
No files matched your search
@@ -1321,8 +1321,6 @@ func (q *checker) bcheckExprUnaryOp(n *a.Expr, depth uint32) (bounds, error) {
|
||||
return bounds{neg(rb[1]), neg(rb[0])}, nil
|
||||
case t.IDXUnaryNot:
|
||||
return bounds{zero, one}, nil
|
||||
case t.IDXUnaryRef, t.IDXUnaryDeref:
|
||||
return q.bcheckTypeExpr(n.MType())
|
||||
}
|
||||
|
||||
return bounds{}, fmt.Errorf("check: unrecognized token (0x%X) for bcheckExprUnaryOp", n.Operator())
|
||||
|
||||
@@ -659,17 +659,6 @@ func (q *checker) tcheckExprUnaryOp(n *a.Expr, depth uint32) error {
|
||||
}
|
||||
n.SetMType(typeExprBool)
|
||||
return nil
|
||||
|
||||
case t.IDXUnaryRef:
|
||||
// TODO.
|
||||
|
||||
case t.IDXUnaryDeref:
|
||||
if rTyp.Decorator() != t.IDPtr { // TODO: t.IDNptr?
|
||||
return fmt.Errorf("check: %q is a dereference of a non-pointer type %q",
|
||||
n.Str(q.tm), rTyp.Str(q.tm))
|
||||
}
|
||||
n.SetMType(rTyp.Inner())
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("check: unrecognized token (0x%X) for tcheckExprUnaryOp", n.Operator())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user