In KY1 tests, i get a testprogram:
class quz {
inquz() {
print "from quz";
}
}
class hello < quz {
inhello() {
print "from hello";
}
}
class bar < hello {
inbar() {
print "from bar";
}
}
// bar should inherit the methods
// from both quz and hello
var bar = bar();
bar.inquz();
bar.inhello();
bar.inbar();
I dont think it should be possible that the instance name and the classname clash ?
The book doesnt mention anything explicit on the topic, but in the environment, everything is stored in a map indexed by name, so the instance definition will overwrite the class definition, thereby loosing all the class information.
Or am i missing something?
Thanks,
Kurt