public
Created

  • Download Gist
inferredFunctionParam.as
ActionScript
1 2 3 4 5 6
function inferred(x) {
return x;
}
 
inferred("abc"); // will take the string and return it
inferred(1); // will throw a compiler error because x is typed to String now

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.