Ticket #75 (closed defect: fixed)

Opened 11 years ago

Last modified 10 years ago

Catch assignments to read-only properties and indexers

Reported by: Chuck Owned by: eric.sellon
Priority: minor Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:


This is an error that Cobra misses that is dropping through to C#.

class X

	get two as int
		return 2

	def main is shared
		x = X()
		x.two = 4  # .error. cannot be assigned to

# drops through to C#:
# Property or indexer "X.Two" cannot be assigned to -- it is read only (C#)


ticket75.patch Download (1.0 KB) - added by eric.sellon 10 years ago.

Change History

Changed 10 years ago by eric.sellon

Changed 10 years ago by eric.sellon

  • owner set to eric.sellon
  • status changed from new to assigned

This patch fixes the case outlined in the description. If there is a read-only indexers case, then I did not test that.

Changed 10 years ago by Chuck

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

Thanks. Applied in changeset:2231

Note: See TracTickets for help on using tickets.