Wiki

Ticket #340 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

Cobra internal error when mixin declared after class

Reported by: nerdzero Owned by:
Priority: major Milestone:
Component: Cobra Compiler Version: 0.9.4
Keywords: Cc:

Description

The following program executes correctly when the mixin is declared before the class but not if declared after:

interface IFoo
	get bar as int

class Foo
	adds FooBehavior
	implements IFoo
	
mixin FooBehavior
	get bar as int
		return 1

class Program
	def main
		f = Foo()
		print f.bar

Note that this same issue is encountered when the mixin is declared in a different file from the class declaration and the order of the files specifies the file containing the class before the file containing mixin.

Change History

Changed 11 years ago by Charles

Fix is ready pending regression tests.

Changed 11 years ago by Charles

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

Fixed in changeset:3019

Changed 11 years ago by nerdzero

Sweet

Note: See TracTickets for help on using tickets.