Skip to content

Type information can get lost (and inference is not possible) #1018

@maximebuyse

Description

@maximebuyse

The following rust example:

fn test() -> bool {
    let x: Option<u8> = None;
    x.is_none()
}

gets translated to the following lean:

def test : Result Bool := do
  ok (core.option.Option.is_none none)

And here lean fails because it doesn't know how to instantiate the type argument for option of the none literal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions