Ticket #334 (closed defect: fixed)
Cobra Internal error if source file ends in comma separated expression
Reported by: | hopscc | Owned by: | Chuck |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Cobra Compiler | Version: | 0.9.4 |
Keywords: | Cc: |
Description
Reported by Chasm
See forum item
test program
class Program def main variable as int streamReader = StreamReader("Something.txt") streamReader.getType(variable,
When looking for separators or terminators, CobraParser commaSepExpr handling does some .peek calls and immediately derefs the result.
If there is no token ( end of Stream) this gets a
NullReferenceException which generates a COBRA INTERNAL ERROR.
specific patch on its way pending testing but more generally
perhaps use of this this pattern
.peek.which.isOneOf(...)
needs hardening...
Attachments
Change History
Note: See
TracTickets for help on using
tickets.