Skip to content

fallthrough not compiling #424

Open
Open
@BSteffaniak

Description

@BSteffaniak
public static async boolQuestion(
String value,
String invalidResponseMessage = null
) =>
Bool.fromString(question(
  value,
  {
    let response = match _.toLowerCase() {
      "y" => fallthrough
      "yes" => fallthrough
      "n" => fallthrough
      "no" => true
      default => false
    }

    return response
  },
  {
    let response = match _ {
      "y" => fallthrough
      "yes" => "true"
      "n" => fallthrough
      "no" => "false"
      default => "false"
    }

    return response
  },
  invalidResponseMessage ?: "Invalid answer. Please respond with 'y' or 'n'"
))

Error: Invalid case value 'fallthrough' for expression - in file "flat/readline/ReadLine.flat" on line number 5 at offset 0 [15, 36]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions