1 // Copyright 2018 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "callback.h"
6 
Foo(base::OnceClosure)7 void Foo(base::OnceClosure) {}
8 
Bar(int,base::OnceClosure,int)9 void Bar(int, base::OnceClosure, int) {}
10 
Test()11 void Test() {
12   base::OnceClosure cb = base::BindOnce([] {});
13   Foo(base::BindOnce([] {}));
14   Bar(1, base::BindOnce([] {}), 1);
15 
16   using namespace base;
17 
18   OnceClosure cb2 = BindOnce([] {});
19   Foo(BindOnce([] {}));
20   Bar(1, BindOnce([] {}), 1);
21 
22   OnceClosure cb3 = BindOnce([] {});
23 }
24