Super super!

BlitzMax Forums/BlitzMax Programming/Super super!

Czar Flavius(Posted 2010) [#1]
Can I do this? (Well I know I can't, is there a way around?)
Strict
Type a
	Method test:String()
		Return "a"
	End Method
End Type

Type b Extends a
	Method test:String() Abstract
End Type

Type c Extends b
	Method test:String()
		Return Super.Super.test()
	End Method
End Type

Print New c.test() 'i want "a"



TaskMaster(Posted 2010) [#2]
Wouldn't this work?

Strict
Type a
	Method test:String()
		Return "a"
	End Method
End Type

Type b Extends a
	Method test:String()
		Return Super.test()
	End Method    
End Type

Type c Extends b
	Method test:String()
		Return Super.test()
	End Method
End Type

Print New c.test() 'i want "a"


Edited out failed response... Now that I tested.


markcw(Posted 2010) [#3]
Abstract has to be the base class.


jkrankie(Posted 2010) [#4]
What mcv said. you can have the method doing nothing in the derived class, but not abstract.

Cheers
Charlie


Czar Flavius(Posted 2010) [#5]
I've got around it by just copying the super super method code into the bottom method code. It works for now.

You can have abstract overidden methods in derived classes.