fasterthanlime / jooc-legacy

:crocodile: The historical, initial implementation of an ooc compiler in Java
http://ooc-lang.org/
MIT License
115 stars 4 forks source link

NullPointerException when assigning the return value of a return value of a function #29

Open fredreichbier opened 15 years ago

fredreichbier commented 15 years ago

Related to #28, but it's funny anyway \o/

test: func -> Func {
    return test
}

a := test()()
Exception in thread "main" java.lang.NullPointerException
    at org.ooc.frontend.parser.ExpressionParser.parse(ExpressionParser.java:76)
    at org.ooc.frontend.parser.ExpressionParser.parse(ExpressionParser.java:44)
    at org.ooc.frontend.parser.StatementParser.parse(StatementParser.java:46)
    at org.ooc.frontend.parser.LineParser.fill(LineParser.java:36)
    at org.ooc.frontend.parser.ModuleParser.parse(ModuleParser.java:80)
    at org.ooc.frontend.parser.Parser.parse(Parser.java:47)
    at org.ooc.frontend.parser.Parser.parse(Parser.java:30)
    at org.ooc.frontend.CommandLine.parse(CommandLine.java:345)
    at org.ooc.frontend.CommandLine.(CommandLine.java:257)
    at org.ooc.frontend.CommandLine.main(CommandLine.java:35)