mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2024, Matthew Olsson <mattco@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
// RUN: %clang++ -Xclang -verify %plugin_opts% -c %s -o %t 2>&1
|
|
|
|
#include <AK/Optional.h>
|
|
#include <AK/Variant.h>
|
|
#include <LibJS/Runtime/Object.h>
|
|
|
|
class ForwardDeclaredObject;
|
|
|
|
class TestClass : public JS::Object {
|
|
JS_OBJECT(TestClass, JS::Object);
|
|
|
|
virtual void visit_edges(Visitor& visitor) override
|
|
{
|
|
Base::visit_edges(visitor);
|
|
}
|
|
|
|
// expected-error@+1 {{GC-allocated member is not visited in TestClass::visit_edges}}
|
|
GC::Ptr<JS::Object> m_object;
|
|
|
|
// expected-error@+1 {{GC-allocated member is not visited in TestClass::visit_edges}}
|
|
JS::Value m_value;
|
|
|
|
// expected-error@+1 {{GC-allocated member is not visited in TestClass::visit_edges}}
|
|
GC::Ptr<ForwardDeclaredObject> m_forward_declared_object;
|
|
|
|
// expected-error@+1 {{GC-allocated member is not visited in TestClass::visit_edges}}
|
|
AK::Optional<GC::Ptr<JS::Object>> m_optional_object;
|
|
|
|
// expected-error@+1 {{GC-allocated member is not visited in TestClass::visit_edges}}
|
|
AK::Variant<Empty, GC::Ptr<JS::Object>> m_variant_object;
|
|
};
|