pufuwozu/roy — Issue #78: Disallow identically named functions
Author: eegg
Created: 2011-12-13 18:41:16+00:00
State: open

The Roy code

let x y = 5
let x y = 6

generates (0.1.3) the JS

```javascript
var x = function(y) {
return 5;
}
var x = function(y) {
return 6;
}
```

The Roy code

let x y = 5
let x y z = 6

currently generates

```javascript
var x = function(y) {
return 5;
}
var x = function(y, z) {
return 6;
}
```

The compiler should actually generate one of two errors:

* in current Roy, the error should be "multiple definitions of the function `x`"
* in the first case, if and when pattern matching in function parameters is enabled, the error should be "Pattern matches are overlapped"