Skip to content

Templates are not mapped when using self-call struct as a function argument #278

@KeeVeeGames

Description

@KeeVeeGames
/// @hint SorterT<T>:(a:T, b:T)->int
/// @hint SorterT<T>:invoke(a:T, b:T)->int

let a1 = [1, 2, 3];
let a2 = ["1", "2", "3"];

var sorterT:SorterT<int>;
array_sort(a1, sorterT); // OK
array_sort(a2, sorterT); // should warn but it doesn't
array_sort(a1, sorterT.invoke); // OK
array_sort(a2, sorterT.invoke); // warns as expected

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