Ticket #185 (closed defect: fixed)

Opened 12 years ago

Last modified 11 years ago

Cannot refer to generic type in extended initialization

Reported by: Chuck Owned by:
Priority: medium Milestone: Cobra 0.9
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:


The following program generates a false compilation error on the second to last line:

class A

	pro b from var as Object?

class P

	def main
		a = A()
		assert a.b is nil
		a = A(b=5)
		assert a.b == 5

		a = A(b=String)
		assert a.b is String

		a = A(b=List<of String>)
		assert a.b is List<of String>

Reported by gauthier in the discussion forums.

Change History

Changed 12 years ago by Chuck

Btw it's a code gen bug.

Changed 11 years ago by Chuck

  • status changed from new to closed
  • resolution set to fixed

Fixed in changeset:2251

Note: See TracTickets for help on using tickets.