cliffclick / aa

Cliff Click Language Hacking
Apache License 2.0
276 stars 22 forks source link

AssertionError when a function has duplicate parameter names #18

Closed beickhoff closed 3 years ago

beickhoff commented 3 years ago

For example,

run("f = {x:int x:int -> x + x}");

yields

java.lang.AssertionError
    at com.cliffc.aa.type.TypeStruct.add_fld(TypeStruct.java:1129)
    at com.cliffc.aa.Parse.func(Parse.java:894)
    …

Replacing this with a proper parsing error.