Skip to content

Always require optional field in python target #70

@kanghyojun

Description

@kanghyojun
record foo (
  text? optional-data
);

Above foo record compiled to

class Foo:
    ...

    def __init__(self, optional_data: typing.Optional[str]) -> None:
        ...

It requires optional_data as a argument to initiate class Foo, although optional_data is optional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cmp:compilerComponent: Compiler backend (e.g., annotation processors, code generators)target:pythontyp:bugType: Bug/defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions