Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-381

simple primitive casting not parsed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-5
    • parser
    • None

    Description

      1> c = (char)123
      discarding 1> line:1: expected <identifier>; found ')' at 1:10
      c = (char)123
      ^

      I think the this part in the Parser.expression() is missing primitive castings:

      ...
      case Types.CREATABLE_PRIMITIVE_TYPE:
      {
      if( stack.atStartOfExpression() )

      { stack.push( variableDeclarationExpression(consume()) ); }

      else

      { error( "type name not valid in this context" ); }

      break;
      }

      ...

      Attachments

        Activity

          People

            bob Bob Paulin
            bingran Bing Ran
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: