Ticket #142 (assigned defect)
problem when using an object variable of nilable generic type
Reported by: | jonathandavid | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | generics, nilable | Cc: |
Description
The following program triggers a runtime assertion, complaining that myT is nil. It is as if the compiler did not realize that T is taking the value int?, and that therefore "myT" should be allowed to be nil.
class G<of T> var myT as T class Program var g = G<of int?>() def main is shared p = Program()
Attachments
Change History
Note: See
TracTickets for help on using
tickets.