puffnfresh / roy

Small functional language that compiles to JavaScript.
http://roy.brianmckenna.org/
MIT License
837 stars 74 forks source link

Option monad and deep matching tests are broken #46

Closed paulmillr closed 13 years ago

paulmillr commented 13 years ago

Commit 8f31ad8d450ca348958c386a5903d8ddac6a1a51 brokes tests option_monad and deep_matching:


Error: test/option_monad.roy Command failed: 
node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
TypeError: Cannot read property '0' of undefined
    at roy/src/typeinference.js:425:76
    at Array.forEach (native)
    at Function.<anonymous> (roy/node_modules/underscore/underscore.js:81:11)
    at roy/src/typeinference.js:424:23
    at roy/src/typeinference.js:451:17
    at Array.forEach (native)
    at Function.<anonymous> (roy/node_modules/underscore/underscore.js:81:11)
    at Object.visitMatch (roy/src/typeinference.js:417:15)
    at [object Object].accept (roy/src/nodes.js:106:26)
    at roy/src/typeinference.js:141:17

Error: test/deep_matching.roy Command failed: 
node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
TypeError: Cannot read property '0' of undefined
    at roy/src/typeinference.js:425:76
    at Array.forEach (native)
    at Function.<anonymous> (roy/node_modules/underscore/underscore.js:81:11)
    at roy/src/typeinference.js:424:23
    at roy/src/typeinference.js:451:17
    at Array.forEach (native)
    at Function.<anonymous> (roy/node_modules/underscore/underscore.js:81:11)
    at Object.visitMatch (roy/src/typeinference.js:417:15)
    at [object Object].accept (roy/src/nodes.js:106:26)
    at roy/src/typeinference.js:141:17
puffnfresh commented 13 years ago

Thanks heaps! I'm going to add a precommit hook so this doesn't happen again.

Fixed in 9517d9851d004bcc30248fb5b496c9eea084d45f.