Report an error when using "this" before chaining up to the base class
Submitted by ccadete
Link to original bug (#567269)
Description
Please describe the problem: Should not be possible to use "this" before executing the base class constructors
Steps to reproduce:
using GLib;
public class ClassA : Object {
public ClassA(ClassB param){ stdout.printf ("ClassA\n"); }
}
public class ClassB : ClassA {
public ClassB(){ base(this); stdout.printf ("ClassB\n"); }
/* NOTE: Using "this" in method, should not be possible too
public ClassB(){ base(util(this)); stdout.printf ("ClassB\n"); }
public static ClassB util (ClassB p){ return p; } */
public static void main (string[] args) { new ClassB(); }
}
Actual results: critical warning
Expected results:
Does this happen every time?
Other information: