You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Base-class getter/method reading this.<overridden getter> calls the base getter directly (subclass override ignored) #11213
Inside a base-class getter or method, reading this.<getter> returns the base class's getter even when the receiver is a subclass instance that overrides that getter. This happens with plain top-level classes and needs no packages.
Perry origin/main400ae8c (perry-dev build, PERRY_NO_AUTO_OPTIMIZE=1) prints g, then throws abstract for the other two.
Where it goes wrong
A gdb backtrace on the base getter shows perry_method_…__Zone____get_get_inherited calling perry_method_…__Zone____get_get_typedirectly. The this.type read inside a Zone member is lowered as a static call to Zone's own getter, instead of a virtual read on the receiver. So a subclass override is never consulted. I have not yet found where in codegen this call is devirtualized.
luxon's abstract Zone uses exactly this shape (for example get isUniversal, and equals reading this.type), so zone code paths that go through a base member can throw "Zone is an abstract class".
I found this while fixing the #11190 / test_gap_cron_cronjob regression. It is separate from that regression and already present on main.
Activity