#!/usr/bin/env qore
# -*- mode: qore; indent-tabs-mode: nil -*-

%require-our
%requires qore >= 0.8
%new-style

class T1 { 
    public { int id; *T1 a; *T1 b; *T1 c;} 
    constructor(int i) { id = i; } 
    destructor() { printf("deleting %d\n", id); } 
    set(*T1 aa) { a = aa; }
}
class T2 inherits T1 {constructor(int i) : T1(i) {}}
class T3 inherits T2 {constructor(int i) : T2(i) {}}

T1 t1(1);
T2 t2(2);
t2.a = t2;
t1.a = t2;
t1.b = t2;
#t1.c = t2;
