mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
check: ban bulk methods on slices of refined types
This commit is contained in:
1 parent
be9d3fcf0f
commit
d60bfb05e8
1 file changed
+4
-3
+4
-3
@@ -756,10 +756,11 @@ func (q *checker) tcheckDot(n *a.Expr, depth uint32) error {
|
||||
if q.c.isBuiltInSliceFunc(qqid, lTyp) {
|
||||
bulky := false
|
||||
switch qqid[2] {
|
||||
case t.IDBulkLoadHostEndian:
|
||||
case t.IDBulkMemset:
|
||||
case t.IDBulkSaveHostEndian:
|
||||
case t.IDBulkLoadHostEndian, t.IDBulkMemset, t.IDBulkSaveHostEndian:
|
||||
bulky = true
|
||||
if lTyp.Innermost().IsRefined() {
|
||||
return fmt.Errorf("check: cannot apply bulk methods to slices of refined numeric types")
|
||||
}
|
||||
}
|
||||
|
||||
if !bulky || lTyp.Inner().IsBulkNumType() {
|
||||
|
||||
Reference in new issue
Block a user