language

some fools attempt at an interpreted language
Log | Files | Refs | README

problem.ti (532B)


      1 class UsedByUsedByTesting:
      2 {
      3 	int property_three = 3;
      4 
      5 	func testing (int i) -> void:
      6 	{
      7 		property_three = property_three * i;
      8 	}
      9 }
     10 
     11 class UsedByTesting:
     12 {
     13 	int property_two = 2;
     14 
     15 	var x = new UsedByUsedByTesting();
     16 
     17 	func action -> void:
     18 	{
     19 		x.testing(property_two);
     20 	}
     21 }
     22 
     23 class Testing:
     24 {
     25 	int property_one = 1;
     26 
     27 	var y = new UsedByTesting();
     28 
     29 	print y.x.property_three;
     30 	print y.property_two;
     31 	print property_one;
     32 
     33 	y.action();
     34 
     35 	print y.x.property_three;
     36 	print y.property_two;
     37 	print property_one;
     38 }
     39 
     40 var t = new Testing();
     41