Skip to content

Higher-order argument modes generate contradictory compile errors #2721

Closed
@bblum

Description

@bblum

error: mismatched types: expected fn@(&&<V1>) but found native fn(str) (expected argument mode ++ but found &&)

This arose when passing a fn(str) as an argument to a function expecting fn@(T). No explicit argument mode annotation was used.

note the contradiction: "expected ..&&.." at first followed by "expected ..++.." later. Patrick seems to think they must be referring to the same thing (the argument of the function being passed) because it wouldn't come up without higher-order arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions