Unity fails to compile valid c# expression

this statement fails to compile with the current beta:

var foo = Enumerable.Range(0, Input.touchCount).Select(Input.GetTouch);

error CS0411: The type arguments for method `System.Linq.Enumerable.Select<TSource,TResult>(this System.Collections.Generic.IEnumerable, System.Func<TSource,int,TResult>)’ cannot be inferred from the usage. Try specifying the type arguments explicitly

whereas this works:

var foo = Enumerable.Range(0, Input.touchCount).Select(p => Input.GetTouch(p));

both should be valid afaik

Only in WebGL?

good question, didn’t try to switch platform yet, will let ya know as soon as i find some time :wink: