2014-04-18 17:22:46 +04:00
|
|
|
public class AAA : Object {
|
|
|
|
}
|
|
|
|
|
|
|
|
public class BBB : AAA {
|
|
|
|
}
|
|
|
|
|
|
|
|
void main () {
|
|
|
|
AAA real_a = new AAA ();
|
2014-06-23 14:13:25 +04:00
|
|
|
stdout.printf ("real_a = %s\n", real_a.get_type ().name ());
|
2014-04-18 17:22:46 +04:00
|
|
|
BBB real_b = new BBB ();
|
2014-06-23 14:13:25 +04:00
|
|
|
stdout.printf ("real_b = %s\n", real_b.get_type ().name ());
|
2014-04-18 17:22:46 +04:00
|
|
|
|
|
|
|
var a_new = Object.new (real_a.get_type ());
|
2014-06-23 14:13:25 +04:00
|
|
|
stdout.printf ("a_new = %s\n", a_new.get_type ().name ());
|
2014-04-18 17:22:46 +04:00
|
|
|
var b_new = Object.new (real_b.get_type ());
|
2014-06-23 14:13:25 +04:00
|
|
|
stdout.printf ("b_new = %s\n", b_new.get_type ().name ());
|
2014-04-18 17:22:46 +04:00
|
|
|
}
|