Remove the !? effect, leaving only ! and !??

This commit is contained in:
Nigel Tao committed 2018-12-29 13:36:38 +11:00
1 parent d4be1fdf72
commit 1ea32b3745
7 files changed
+20 -28

No files matched your search

+1 -1
View File
@@ -433,7 +433,7 @@ func (c *Checker) checkFuncSignature(node *a.Node) error {
}
setPlaceholderMBoundsMType(n.In().AsNode())
if out := n.Out(); out != nil {
if n.Effect().Optional() && n.Receiver()[0] != t.IDBase {
if n.Effect().Coroutine() && n.Receiver()[0] != t.IDBase {
return &Error{
Err: fmt.Errorf("func %s has ? effect but non-empty return type", n.QQID().Str(c.tm)),
Filename: n.Filename(),