Skip to content

Primitive match statement expression return value not properly autoboxed #426

Open
@BSteffaniak

Description

@BSteffaniak
let response = match _.toLowerCase() {
  "y" => true
  "yes" => true
  "n" => true
  "no" => true
  default => false
}

return response

produces:

let response = flat_null;
if (_1.toLowerCase().equals(FlatString.construct4("y"))) {
	response = true;
} else if (_1.toLowerCase().equals(FlatString.construct4("yes"))) {
	response = true;
} else if (_1.toLowerCase().equals(FlatString.construct4("n"))) {
	response = true;
} else if (_1.toLowerCase().equals(FlatString.construct4("no"))) {
	response = true;
} else {
	response = false;
}

return (response).value;

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions