/*EXPECTED
10
10
*/
class F.<T> {
	inline static function forEach(a : Array.<T>, f : function (:Nullable.<T>) : void) : void {
		for (var i = 0; i < a.length; ++i) {
			f(a[i]);
		}
	}
}
class Test {
	static function run() : void {
		var sum = 0;
		F.<number>.forEach([ 1, 2, 3, 4 ], (n) -> { sum += n; });
	}
}
