Wiki

Ticket #27: explicitArraySizeErrorMod.patch

File explicitArraySizeErrorMod.patch, 1.3 KB (added by hopscc, 16 years ago)

alternate patch indicating supported syntax

  • Source/CobraParser.cobra

     
    30093009        bracket = .optional('LBRACKET') 
    30103010        if bracket 
    30113011            if .peek.which=='INTEGER_LIT' 
    3012                 .throwError('Explicit array sizes are not currently supported.') 
     3012                .throwError(r'Explicitly sized arrays are not declared this way for some unknown reason. Do as an assignment to an arrayType with literal size in following braces e.g. ia as int[] = int[](10)') 
    30133013            .expect('RBRACKET') 
    30143014            t = ArrayTypeIdentifier(bracket, t) 
    30153015 
  • Developer/IntermediateReleaseNotes.text

     
    4646* Fixed: Method return types from generics in DLLs are always considered nilable even if the generic parameter was not (such as `bool`). ticket:22 
    4747 
    4848* Fixed: Assignments (and other side effects) can appear in assert conditions even though they might be excluded during compilation or run-time. ticket:4 (hopscc) 
     49 
     50* Modified: Change error message for a sized array  declaration to indicate the supported syntax. ticket:27 (hopscc)