class Car def drive pass class Test var _cars as List cue init base.init _cars = [Car(), Car(), Car()] def run for car in _cars.getRange(1, _cars.count-1) # should infer car's type as Car, not T car.drive def main is shared Test().run