Wiki

Ticket #314 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

Comment block with extra opening tag supresses following code

Reported by: nerdzero Owned by: Charles
Priority: major Milestone:
Component: Cobra Compiler Version: 0.9.3
Keywords: tokenizer Cc:

Description

This ticket is similar to: http://cobra-language.com/trac/cobra/ticket/311

In the following code, the line .b = 2 is never executed.

class CommentBomb2

    var a = 0
    var b = 0

    def main
        assert .a == 0
        assert .b == 0
        .foo
        assert .a == 1
        assert .b == 2

    def foo
        .a = 1
        /#
        a quick and dirty expansion of an
        existing comment block
        /#
        the previous comment block
        #/
        .b = 2

This issue has a workaround: Add an extra closing comment block.

Change History

Changed 12 years ago by Charles

  • priority changed from trivial to major

Thanks for the report. I'm changing the priority from "trivial" to "major". Silent code exclusion is nasty!

Changed 12 years ago by Charles

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

Changed 12 years ago by nerdzero

Good point. Another case to check for is a comment block containing a one line comment block. Adding an extra closing tag doesn't work in that case.

/#
like this
/# one liner #/
#/

Changed 12 years ago by Charles

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.