- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for IsMethodApplicable (0.2 sec)
-
src/cmd/compile/internal/types/type.go
func IsInterfaceMethod(f *Type) bool { return f.Recv().Type == FakeRecvType() } // IsMethodApplicable reports whether method m can be called on a // value of type t. This is necessary because we compute a single // method set for both T and *T, but some *T methods are not // applicable to T receivers. func IsMethodApplicable(t *Type, m *Field) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 49.5K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
} CalcMethods(mt) ms = mt.AllMethods() } m := Lookdot1(nil, sym, recv, ms, 0) if m == nil { base.FatalfAt(pos, "type %v has no method %v", recv, sym) } if !types.IsMethodApplicable(recv, m) { base.FatalfAt(pos, "invalid method expression %v.%v (needs pointer receiver)", recv, sym) } n := ir.NewSelectorExpr(pos, ir.OMETHEXPR, ir.TypeNode(recv), sym) n.Selection = m
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0)