munificent/magpie — Issue #13: () pattern causes null pointer exception
Author: aJanuary
Created: 2011-10-30 01:38:00+00:00
State: open

Evaluating the code:
```def foo(())
end
foo()```

or

```match "foo"
case () then print("yay")
end```

causes the following exception:

Exception in thread "main" java.lang.NullPointerException
at com.stuffwithstuff.magpie.interpreter.PatternTester.test(PatternTester.java:15)
at com.stuffwithstuff.magpie.interpreter.ExprEvaluator.evaluateCases(ExprEvaluator.java:334)
at com.stuffwithstuff.magpie.interpreter.ExprEvaluator.visit(ExprEvaluator.java:202)
at com.stuffwithstuff.magpie.interpreter.ExprEvaluator.visit(ExprEvaluator.java:20)
at com.stuffwithstuff.magpie.ast.MatchExpr.accept(MatchExpr.java:21)
at com.stuffwithstuff.magpie.interpreter.ExprEvaluator.evaluate(ExprEvaluator.java:33)
at com.stuffwithstuff.magpie.interpreter.Interpreter.evaluate(Interpreter.java:55)
at com.stuffwithstuff.magpie.interpreter.Interpreter.interpret(Interpreter.java:50)
at com.stuffwithstuff.magpie.Repl.readAndEvaluate(Repl.java:24)
at com.stuffwithstuff.magpie.app.ConsoleRepl.run(ConsoleRepl.java:31)
at com.stuffwithstuff.magpie.app.MagpieApp.main(MagpieApp.java:38)