RosettaCodeData/Task/Inheritance-Multiple/Lingo/inheritance-multiple-3.lingo
2016-12-05 23:44:36 +01:00

15 lines
331 B
Text

-- parent script "CameraPhone"
property ancestor
on new (me)
c = script("Camera").new()
mp = script("MobilePhone").new()
-- make the Camera instance a parent of the MobilePhone instance
mp.setProp(#ancestor, c)
-- make the MobilePhone instance a parent of this CameraPhone instance
me.ancestor = mp
return me
end