mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 00:47:56 +01:00
Add a (table T).linearize method
This commit is contained in:
1 parent
f6cd4b2af2
commit
85256c7a45
13 files changed
+120
-2
No files matched your search
+4
-1
@@ -532,8 +532,11 @@ func (q *checker) tcheckExprCall(n *a.Expr, depth uint32) error {
|
||||
case t.QID{t.IDBase, t.IDDagger1}:
|
||||
genericType1 = lhs.MType().Receiver()
|
||||
case t.QID{t.IDBase, t.IDDagger2}:
|
||||
genericType1 = lhs.MType().Receiver() // TODO: convert table T to slice T.
|
||||
genericType2 = lhs.MType().Receiver()
|
||||
if genericType2.Decorator() != t.IDTable {
|
||||
return fmt.Errorf("check: internal error: %q is not a generic table", genericType2.Str(q.tm))
|
||||
}
|
||||
genericType1 = a.NewTypeExpr(t.IDSlice, 0, 0, nil, nil, genericType2.Inner())
|
||||
}
|
||||
|
||||
// Check that the func's in type matches the arguments.
|
||||
|
||||
Reference in new issue
Block a user