Page MenuHomeFeedback Tracker

[Feature Request] Add super(after)
Feedback, NormalPublic

Description

Add a Python-like super(type) that looks for a method after type in the inheritance chain, rather than after the current class it was called from.
For example, we have:

// vanilla/A.c
class A {
    void f() {
        Print("A.f");
    };
};
// vanilla/B.c
class B : A {
    override void f() {
        Print("B.f");
        super.f(); // calls A.f
    };
};

And in some mod we want to completely override B.f:

// mod/Modded/B.c
modded class B {
    override void f() {
        Print("modded B.f");
        super.f(); // calls B.f and later A.f
        super(B).f(); // calls only A.f, skiping B.f
    };
};

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 11 x64
Category
General

Event Timeline

Geez changed the task status from New to Feedback.Mar 25 2024, 12:08 PM