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

Provide friendly error message for invalid lambda body

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • None
    • None
    • parser-antlr4
    • None

    Description

      We should provide friendly error message like "Statements should be wrapped in a block, e.g. () ->

      { some statements here }", e.g.

      Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some statements here }

      @ line 1, column 15.
      def a = () -> assert 1 == 1
      ^

      Attachments

        Activity

          People

            Unassigned Unassigned
            daniel_sun Daniel Sun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: