Skip to content

Unexpected return type during build for tuple of enum value #61

@m4tiz5zktonj

Description

@m4tiz5zktonj

Since 2.0.115 during build:

import Toybox.Lang;

enum Enum {
    VALUE_1 = 0,
    VALUE_2 = false,
}

(:keep)
function test() as [Number] {
    // Expected $.test to return [Number] but got [False or Number<0> as Enum]
    // Expected $.test to return [Number] but got [Boolean or Number]
    return [VALUE_1];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions