Skip to content

Add @interface decorator #239

Closed
Closed
@certik

Description

@certik

Currently we define a function interface using:

def complex(x: f64, y: f64) -> c64:
    pass

But that is the same syntax as for an empty function. I think we should add an @interface decorator into ltypes, which would probably raise an exception if the function was ever being called (by CPython). In LPython, that would declare an interface, meaning the function with that name must be provided in global scope at some point before compiling to LLVM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions