Skip to content

Give type parameters kind constraints, and check them. #132

Closed
@froystig

Description

@froystig

Some items need to have information about the possible kind of the type parameters they accept. For instance, the following function:

fn vec1[copy T](&T x) -> vec[T] { ret vec(x); }

The typechecker should check that kind constraints are satisfied whenever type arguments are actually applied to items. Middle-end should make sure to use the kind constraint when calculating the kind of a type-parameter type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)A-type-systemArea: Type system

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions