1#unittest { 2 name: "Test outer ivar read and write."; 3 error: NONE; 4 result: 33; 5}; 6 7class foo { 8 var a = 1; 9 var b = 2; 10 11 class bar { 12 var c = 3; 13 func f1() { 14 a = 10; 15 b = 20; 16 return a+b+c; 17 } 18 } 19 20 func fbar() { 21 var b = bar(); 22 return b.f1(); 23 } 24} 25 26func main() { 27 var f = foo(); 28 return f.fbar(); 29}