Repository navigation
feat(sv): support static class members, super and base constructors - #1696
Conversation
|
This pull request is part of a Mergify stack:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Queued — the merge queue status continues in this comment ↓. |
ff22f03 to
84585ca
Compare
9a40751 to
24af60a
Compare
Revision history
|
24af60a to
e2b0181
Compare
84585ca to
d9257ae
Compare
d9257ae to
bd253bf
Compare
e2b0181 to
44acf26
Compare
Merge Queue Status
This pull request spent 25 minutes 51 seconds in the queue, with no time running CI. ReasonPull request #1696 has been dequeued Queue conditions are not satisfied:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Requeued — the merge queue status continues in this comment ↓. |
44acf26 to
906cd37
Compare
bd253bf to
20012bc
Compare
|
@Mergifyio refresh |
|
@Mergifyio queue |
✅ Pull request refreshed |
Merge Queue Status🛑 Queue command has been cancelled |
Classes may now extend a class that has a constructor, call members of their base through `super`, and declare static properties and methods (IEEE 1800-2023 8.9, 8.10, 8.15, 8.17, 8.23). - A `new` expression allocates the object and passes it to the constructor `C::new(this, args)`, which only initializes it: it calls the base constructor with the arguments of a leading `super.new(...)` or of `extends Base(...)`, runs the initializers of the properties its class declares, then its body. Constructors are no longer inherited, so a class without one gets an implicit constructor that calls its base. - `super.m()` and `super.p` reach the members of the base through `this`. `C::new` creates an object of class `C`. - A static property is a variable of the module that declares the class, initialized like other module variables, so each module instance has its own. `h.p`, `C::p` and unqualified names inside methods refer to it. A static method takes no `this` and may be called through a handle, as `C::m()` or unqualified inside the class; a static method that uses a non-static member is rejected. - `C::name` with a class `C` is no longer looked up as a package item. - `++` and `--` work on properties. sv-tests: 8.7-constructor_super, 8.8-typed_constructor, 8.9-static_properties, 8.10-static_methods, 8.13-inheritance, 8.14-override_member, 8.15-super, 8.17-constructor_const_arg and 8.23-scope_resolution now pass in both state modes (509 / 511). Icarus 13.0 cannot parse class scope resolution; its failure on the new static-member case is recorded as a reviewed limitation. Change-Id: I15a7dd1a41d0358f92163d3683ed46b3caa06f7a
906cd37 to
535f07b
Compare
Merge Queue Status
This pull request spent 1 hour 9 minutes 52 seconds in the queue, including 1 hour 8 minutes 16 seconds running CI. Required conditions to merge
|
Classes may now extend a class that has a constructor, call members of
their base through
super, and declare static properties and methods(IEEE 1800-2023 8.9, 8.10, 8.15, 8.17, 8.23).
newexpression allocates the object and passes it to theconstructor
C::new(this, args), which only initializes it: it callsthe base constructor with the arguments of a leading
super.new(...)or of
extends Base(...), runs the initializers of the propertiesits class declares, then its body. Constructors are no longer
inherited, so a class without one gets an implicit constructor that
calls its base.
super.m()andsuper.preach the members of the base throughthis.C::newcreates an object of classC.initialized like other module variables, so each module instance has
its own.
h.p,C::pand unqualified names inside methods refer toit. A static method takes no
thisand may be called through ahandle, as
C::m()or unqualified inside the class; a static methodthat uses a non-static member is rejected.
C::namewith a classCis no longer looked up as a package item.++and--work on properties.sv-tests: 8.7-constructor_super, 8.8-typed_constructor,
8.9-static_properties, 8.10-static_methods, 8.13-inheritance,
8.14-override_member, 8.15-super, 8.17-constructor_const_arg and
8.23-scope_resolution now pass in both state modes (509 / 511).
Icarus 13.0 cannot parse class scope resolution; its failure on the new
static-member case is recorded as a reviewed limitation.