Skip to content

[Lint] Cannot resolve redundant type annotation warning for empty array #593

@jribbink

Description

@jribbink

Problem

I cannot resolve this type annotation warning:

var slot0Bytes: [UInt8] = []
//               ^^^^^^ type annotation is redundant, type can be inferred

As trying to change it to a cast does not work either:

 var slot0Bytes = [] as [UInt8]
//                      ^^^^^^ static cast is redundant

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions