Closed
Description
Description
When using the python backend and making use of an anonymous record, the accessors use snake case, while the construction code has camel cased fields, resulting in a KeyError
when called:
Repro code
type data = {| fromId: int |}
// this creates a dict with camel case field "fromId"
let makeData() = {| fromId = 1 |}
let y (d: data) =
d.fromId
from typing import Any
def make_data(__unit: None=None) -> dict[str, Any]:
return {
"fromId": 1
}
def y(d: dict[str, Any]) -> int:
return d["from_id"]
Related information
- Fable version: 4.19.3
- Operating system: osx
Metadata
Metadata
Assignees
Labels
No labels