Ticket #198 (closed defect: fixed)
"error: Use of unassigned local variable" when using value types
Reported by: | gauthier | Owned by: | Chuck |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | Cc: |
Description
class Program def main ensure enddate > begindate body begindate = DateTime.now.date enddate = begindate.addDays(1)
gives
c:\tmp\cobratickets\tmp.cobra(3): error: Use of unassigned local variable "enddate" c:\tmp\cobratickets\tmp.cobra(3): error: Use of unassigned local variable "begindate" Compilation failed - 2 errors, 0 warnings Not running due to errors above.
Looking at intermediate .cs code, I think this may be reproducible only with value types.
Change History
Note: See
TracTickets for help on using
tickets.