mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Allow built-in args' types to be refined
This commit is contained in:
1 parent
a69948b23d
commit
7a9554194c
5 files changed
+29
-47
No files matched your search
@@ -486,6 +486,12 @@ func (c *Checker) checkFuncSignature(node *a.Node) error {
|
||||
// implicit "return out"?
|
||||
|
||||
qqid := n.QQID()
|
||||
if qqid[0] == t.IDBase {
|
||||
// No need to populate c.funcs and c.localVars for built-in funcs. In
|
||||
// any case, the remaining type checking code in this function doesn't
|
||||
// handle the base.◊ diamond type.
|
||||
return nil
|
||||
}
|
||||
if other, ok := c.funcs[qqid]; ok {
|
||||
return &Error{
|
||||
Err: fmt.Errorf("check: duplicate function %s", qqid.Str(c.tm)),
|
||||
|
||||
Reference in new issue
Block a user