Skip to content

Fix Nothing type inference #29

@Alex23087

Description

@Alex23087

For option types, Perk needs to infer the type of nothing. As it currently is, it sometimes does, sometimes not. Below is an example of a program that doesn't compile:

type Example = Idk

// This doesn't compile yet, even though the type is explicitly annotated
let x: Example? = nothing
// One would expect that at least this should compile, but alas not
let y: Example? = cast(Example?, nothing)

fun main(): void {skip}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions