Wiki

Ticket #75 (closed defect: fixed)

Opened 16 years ago

Last modified 15 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:

Description

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#)

Attachments

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

Change History

Changed 15 years ago by eric.sellon

Changed 15 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 15 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.