Skip to content

Case does not check all cases. #11474

@sheganinans

Description

@sheganinans
proc case_test(): string = 
  case "1":
  of "": return "empty"
  of "a": return "aye"
  of "b": return "bee"

echo (case_test())

Given this program, I'm expecting the exhaustiveness checker to complain and not compile. But it compiles, returns an empty string, and a 0 exit code.

Additional Information

$ nim -v
Nim Compiler Version 0.20.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions