File tree 1 file changed +12
-0
lines changed 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,18 @@ func (ExprType) Implements(typ typeName) bool { return boolResult }
216
216
// Is reports whether a type is identical to a given type.
217
217
func (ExprType ) Is (typ string ) bool { return boolResult }
218
218
219
+ // HasPointers reports whether a type contains at least one pointer.
220
+ //
221
+ // We try to be as close to the Go sense of pointer-free objects as possible,
222
+ // therefore string type is not considered to be a pointer-free type.
223
+ //
224
+ // This function may return "true" for some complicated cases as a
225
+ // conservative result. It never returns "false" for a type that
226
+ // actually contains a pointer.
227
+ //
228
+ // So this function is mostly useful for !HasPointers() form.
229
+ func (ExprType ) HasPointers () bool { return boolResult }
230
+
219
231
// OfKind reports whether a matched expr type is compatible with the specified kind.
220
232
//
221
233
// Only a few "kinds" are recognized, the list is provided below.
You can’t perform that action at this time.
0 commit comments