Delete obsolete set_literal_width special case

This commit is contained in:
Nigel Tao committed 2018-05-12 15:55:53 +10:00
1 parent a8767f285b
commit eb377b9684
2 files changed
-35

No files matched your search

-20
View File
@@ -614,26 +614,6 @@ func (q *checker) tcheckExprCall(n *a.Expr, depth uint32) error {
return nil
}
// isThatMethod matches foo.methodName(etc) where etc has nArgs elements.
func isThatMethod(tm *t.Map, n *a.Expr, methodName t.ID, nArgs int) bool {
if k := n.Operator(); k != t.IDOpenParen && k != t.IDTry {
return false
}
if len(n.Args()) != nArgs {
return false
}
n = n.LHS().Expr()
if n.Operator() != t.IDDot || n.Ident() != methodName {
return false
}
n = n.LHS().Expr()
if n.Operator() == t.IDDot &&
(n.Ident() == tm.ByName("src") || n.Ident() == tm.ByName("dst")) {
return false
}
return true
}
func (q *checker) tcheckDot(n *a.Expr, depth uint32) error {
lhs := n.LHS().Expr()
if err := q.tcheckExpr(lhs, depth); err != nil {