Thanks to visit codestin.com
Credit goes to chromium.googlesource.com

blob: a5dc3f4869adfa01cbdf0c7f6a82aa35e792c7fd [file] [log] [blame]
Peter Kasting0bc6a682024-09-09 09:38:341// Copyright 2024 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// This is a "No Compile Test" suite.
6// http://dev.chromium.org/developers/testing/no-compile-tests
7
8#include "base/run_loop.h"
9#include "base/task/sequenced_task_runner.h"
10
11namespace base {
12
13void LvalueQuitClosure() {
14 auto task_runner = SequencedTaskRunner::GetCurrentDefault();
15 task_runner->PostTask(FROM_HERE, RunLoop().QuitClosure()); // expected-error@*:* {{'this' argument to member function 'QuitClosure' is an rvalue, but function has non-const lvalue ref-qualifier}}
16 task_runner->PostTask(FROM_HERE, RunLoop().QuitWhenIdleClosure()); // expected-error@*:* {{'this' argument to member function 'QuitWhenIdleClosure' is an rvalue, but function has non-const lvalue ref-qualifier}}
17}
18
19} // namespace base