AndreVanDelft / scala

The SubScript extension to the Scala programming language
http://www.subscript-lang.org/
12 stars 1 forks source link

Support syntax [scriptCall(?param:Type)] #17

Open AndreVanDelft opened 10 years ago

AndreVanDelft commented 10 years ago

It should be possible to shorten

var param:AType = null; scriptCall(?param); {use param}

to

scriptCall(?param:AType); {use param}

So the second form is short hand for the first one. Note that a var or val script expression should be the direct non-leftmost operand of a sequential operator; the identifier is then defined more to the right of the declaration.