Skip to content

Shoki smart constructors support element type widening #30

@jnape

Description

@jnape

Since shoki data structures are immutable, this should type-check:

interface Animal {}
class Dog implements Animal {}
class Cat implements Animal {}

StrictStack<Animal> animals = Shoki.strictStack(StrictStack.<Dog>strictStack());

...and perform no additional allocations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions