Skip to content

Add test cases for solving higher-kinds against built-in generic types #6

@TIHan

Description

@TIHan

Example test for byref:

#[intrinsic("int32")]
alias int32

#[intrinsic("by_ref")]
alias byref<T>

#[intrinsic("by_ref_read_only")]
alias inref<T>

#[intrinsic("address_of")]
(&)<T>(T): inref<T>

#[intrinsic("address_of")]
(&)<T>(T): byref<T>

#[intrinsic("print")]
print(__oly_object): ()

#[inline]
M<Ref1<_>, T1>(#[inline] f: scoped (int32, Ref1<T1>) -> ()): () where Ref1: scoped =
    ()

main(): () =
    M<_, int32>((_, x: inref<int32>) -> ())
    print("hello")

Need to add test cases similar to this for tuple, array and native pointer types.

Variadic type variable, ref cell, function and native function pointer types are not supported for solving higher kinds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions