class Test get [i as int] as int return 0 def main is shared t = Test() x = t[0] assert x == 0