// Copyright 2018 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.functionf(){return42;}constbound_function=f.bind();constcallable_proxy=newProxy(function(){}.__proto__,{});functiontestSet(ctor){newctor([]);newctor([{},{}]);}functiontestMap(ctor){newctor([]);newctor([[{},{}],[{},{}]]);}functiontestAllVariants(set_or_add_function){Set.prototype.add=set_or_add_function;testSet(Set);WeakSet.prototype.add=set_or_add_function;testSet(WeakSet);Map.prototype.set=set_or_add_function;testMap(Map);WeakMap.prototype.set=set_or_add_function;testMap(WeakMap);}testAllVariants(bound_function);testAllVariants(callable_proxy);