Boo
  1. Boo
  2. BOO-291

BooCodeGenerator generates illegal code for arrays

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5
    • Fix Version/s: 0.7
    • Component/s: Compiler
    • Labels:
      None
    • Number of attachments :
      0

      Description

      For arrays, BooCodeGenerator may output code like

      public def constructor() :
      dependencies as string[]

      This example is taken from an aspx file with inline Boo code (the InlineBooButtonClick.aspx example), running on ASP.NET 2.0 Beta 1, and gives "Compiler Error Message: BCE0043: Unexpected token: [."

      The example work fine with .NET 1.1, I guess there are no array declarations to be generated there.

      The declaration should be "dependencies as (string)" or perhaps "dependencies as (string, 1)".

      These lines (968-974 in BooCodeGenerator.cs) look suspicious:

      int rank = type.ArrayRank;
      if ( rank > 0 )

      { output += "["; for ( --rank; rank > 0; --rank ) output += ","; output += "]"; }

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Hans-Christian Holm
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 hour
              1h
              Remaining:
              Remaining Estimate - 1 hour
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified