Tweak how we parse "try foo?(etc)"

This commit is contained in:
Nigel Tao committed 2018-08-04 08:51:15 +10:00
1 parent df19bcdb03
commit 7fc98dee00
2 files changed
+17 -32

No files matched your search

-4
View File
@@ -580,10 +580,6 @@ func (q *checker) tcheckExprCall(n *a.Expr, depth uint32) error {
setPlaceholderMBoundsMType(o.AsNode())
}
// TODO: distinguish t.IDOpenParen vs t.IDTry in a more principled way?
//
// TODO: figure out calls with and without "?" should interact with the out
// type.
if n.Operator() == t.IDTry {
n.SetMType(typeExprStatus)
} else {