package test
		
	native testFail(string msg)
	native testSuccess()

	string s = ""

	module A 
		
		construct() 
			string x = "A"
			s = s + x
		
		
		ondestroy 
			s = s + "a"
		
		
	
	
	module B 
		use A
		
		construct() 
			string x = "B"
			s = s + x
		
		
		ondestroy 
			s = s + "b"
		
		
	
	
	class C 
		use B
		
		construct() 
			s = s + "C"
		
		
		ondestroy 
			s = s + "c"
		
		
		
			
	
	
	
	init 
		C c = new C()
		
		destroy c
		
		
		if s != "ABCcba" 
			testFail("fail, result = " + s)
		
			
		testSuccess()
	
endpackage

