Wiki

Ticket #157 (new defect)

Opened 8 years ago

Check for error: initializer cannot call itself

Reported by: Chuck Owned by:
Priority: minor Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: error message Cc:

Description

The test case:

class Test

	cue init
		.init
	
	cue init(i as int)
		.init(0)

	def main
		pass

The errors:

x-init-calls-itself.cobra(3): error: Constructor "Test.Test()" cannot call itself (C#)
x-init-calls-itself.cobra(6): error: Constructor "Test.Test(int)" cannot call itself (C#)

These errors are dropping through to the C# compiler. Catch them in Cobra.

Note: See TracTickets for help on using tickets.