1 // Copyright 2022 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.
5 // This is a "No Compile Test" suite.
6 // http://dev.chromium.org/developers/testing/no-compile-tests
8 #include "base/functional/overloaded.h"
10 #include "third_party/abseil-cpp/absl/types/variant.h"
14 #if defined(TEST_LAMDA_MISSING_FOR_A_VARIANT_OPTION) // [r"error: no type named 'type' in 'absl::type_traits_internal::result_of<base::Overloaded<\(lambda at *\)> \(PackageB &\)>'"]
18 absl::variant<PackageA, PackageB> var = PackageA();
20 Overloaded{[](PackageA& pack) { return "PackageA"; }},