view run/final_06.d @ 15:fa94281987cf

added tests for final keyword
author unknown
date Fri, 08 Oct 2004 07:36:36 +0000
parents
children f87ba6507260
line wrap: on
line source

class Parent{
	final int test(){
		return 3;
	}
}

class Child : Parent{
	private int test(){
		return 5;
	}
}

class GrandChild : Child{
}

int main(){
	GrandChild c = new GrandChild();
	assert(c.test()==5);
	return 0;
}