-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Expected return value according to type annotations is Result(String, Nil)
Line 17 in e3c80dd
pub fn get(name: String) -> Result(String, Nil) |
Erlang matches that:
Line 7 in e3c80dd
false -> {error, nil}; |
JS has a string value rather than nil:
Line 14 in e3c80dd
return new GError("Key not found"); |
Neither one is favored in the tests as they both use the _
match:
Line 12 in e3c80dd
let assert Error(_) = envoy.get("UAGE") |
Line 20 in e3c80dd
let assert Error(_) = envoy.get("UAGE") |
The Result(String, Nil)
is probably the desired behavior as it matches dict.get
:
What do you think?
(Related to the test failure on the gleam cookbook: gleam-lang/cookbook#20)
Metadata
Metadata
Assignees
Labels
No labels