Skip to content

[BUG] Can't declare variable/parameter of type pointer to function #718

Closed
@ntrel

Description

@ntrel

Describe the bug
cppfront errors when attempting to do this.

To Reproduce

f: (a: *() -> int) = {}
callback.cpp2(3,9): error: '*'/'const' type qualifiers must be followed by a type name or '_' wildcard (at '(')

Using a type alias also fails:

F: type == () -> int;
f: (a: *F) = {}
callback.cpp2(1,13): error: a 'type ==' alias declaration must be followed by a type name

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions