First cast up chain, if that fails, cast down
This commit is contained in:
@@ -19,8 +19,9 @@ assert_equal(23, t.val)
|
||||
// in a shared_ptr<TestBaseType>. This is testing our ability
|
||||
// to detect that and do the down casting for the user automatically
|
||||
// at runtime
|
||||
var d := derived_type_factory();
|
||||
|
||||
assert_equal(t.derived_only_func(), 19);
|
||||
|
||||
var d := derived_type_factory();
|
||||
assert_equal(d.derived_only_func(), 19);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user