Open apblack opened 7 years ago
The same problem exists with inheriting from a parameter — it's allowed, and should not be.
Here is @KimBruce's example from #251:t presently runs fine, but should be illegal:
def o1 = object {
class c {
method m {print "in c"}
}
}
def o2 = object {
class d {
method n {print "in d"}
}
}
method build(o') {
def b = object {
inherit o'.c
self.m
print "in build"
}
b.m
}
build(o1)
ought to be prohibited regardless of the value assigned to
ooo
.