Ticket #264 (closed defect: fixed)

Opened 8 years ago

Last modified 6 years ago

False compilation error for complex expression

Reported by: Charles Owned by: Chuck
Priority: major Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:


An expression that indexes a list of types, instantiates the type and then invokes a method, fails with a false compilation error:

class A
    def blah
        print "A!"
class B
    def blah
        print "B!"
class C
    def blah
        print "C!"

class Program
    def main
        myList = [A, B, C]
        for i, type in myList.numbered
            # This works:
            type = myList[i]
            # This fails at compile time:

Reported by Dr_Asik in the forums at


tkt264.patch Download (3.1 KB) - added by hopscc 6 years ago.

Change History

Changed 6 years ago by hopscc

Changed 6 years ago by hopscc

  • owner set to Chuck
  • status changed from new to assigned

Fixup codegen for this case (indexer), refactor to remove some dup code.
Add above as a new test.

Changed 6 years ago by Charles

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

Thanks for the patch. changeset:2972

Changed 6 years ago by hopscc

Whats a delimeter ?
(deli-meter - that thing that you pickup a ticket from for service to collect your processed meat and dairy product) (:-)


Note: See TracTickets for help on using tickets.