www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - super BUG

reply Ant <duitoolkit yahoo.ca> writes:
if method B.foo() exist there is no problem
########## Super.d #############
class A
{
	void foo()
	{
		printf("A.foo \n" );
	}
}

class B : A
{
//	void foo()
//	{
//		printf("B.foo \n" );
//		super.foo();
//	}
}
	
class C : B
{
	void foo()
	{
		printf("C.foo \n" );
		super.foo();
	}
}
	
void main()
{
	C c = new C();
	c.foo();
}

#########################
$dmd Super.d -I~/dmd/src/phobos
#########################
$Super
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
C.foo 
.
.
.
.
etc
Aug 21 2004
next sibling parent Ant <duitoolkit yahoo.ca> writes:
On Sat, 21 Aug 2004 11:02:20 -0400, Ant wrote:


forgot:

linux dmd 0.100
(was good with 0.98)

Ant
Aug 21 2004
prev sibling parent reply "Thomas Kuehne" <eisvogel users.sourceforge.net> writes:
Seems to be a regression from 98 to 99.

An schrieb in <pan.2004.08.21.15.02.20.419085 yahoo.ca>
 ########## Super.d #############
 class A
 {
 void foo()
 {
 printf("A.foo \n" );
 }
 }

 class B : A
 {
 // void foo()
 // {
 // printf("B.foo \n" );
 // super.foo();
 // }
 }

 class C : B
 {
 void foo()
 {
 printf("C.foo \n" );
 super.foo();
 }
 }

 void main()
 {
 C c = new C();
 c.foo();
 }

 #########################
 $dmd Super.d -I~/dmd/src/phobos
 #########################
 $Super
 C.foo
 C.foo
 C.foo
 C.foo
 ... etc

Aug 21 2004
parent reply Ant <duitoolkit yahoo.ca> writes:
On Sat, 21 Aug 2004 22:43:48 +0200, Thomas Kuehne wrote:

 Seems to be a regression from 98 to 99.
 

The nineties are officially declared the darkest releases for DUI, lets hope things improve from 0.101... :( Ant
Aug 21 2004
parent Andy Friesen <andy ikagames.com> writes:
Ant wrote:
 On Sat, 21 Aug 2004 22:43:48 +0200, Thomas Kuehne wrote:
 
 
Seems to be a regression from 98 to 99.

The nineties are officially declared the darkest releases for DUI, lets hope things improve from 0.101...

Much like the 1990s, the 0.90s were only bad if you forget the 50s. ;) -- andy
Aug 21 2004