Files
ladybird/Libraries/LibGC/Root.h
Sam Atkins 8af99388a6 LibGC: Make GC::Root bool operator explicit
Not having this led to a sneaky bug where, given a Variant like so:

  Variant<double, GC::Root<T>>

An incorrectly-written visit() branch for the Root would just cause it
to be cast to a double and call that branch instead.

With the cast made explicit, we get a compiler error, which is far more
useful.

Co-authored-by: Jelle Raaijmakers <jelle@ladybird.org>
2025-08-21 12:50:43 -04:00

3.9 KiB