Skip to content

Syntax Error due to case indentation (when a multiline string wrapped in parentheses ends without enough indentation) #2155

Open
@anagrius

Description

@anagrius

Quick Summary:

Elm fails to compile with a Syntax Error when multiline strings when wrapped in parentheses in the examples below:

SSCCE

-- WORKS
y =
    case () of
        () ->
            (1, """
    """  )

-- DOES NOT WORK
y =
    case () of
        () ->
            (1, """
   """ ) -- Notice the parentheses ends before or at the same indent level of the previous cases

-- WORK
y =
    case () of
        () ->
            (1, """
""" {- -} )
  • Elm: 0.19.1
  • Operating System: Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions