Skip to content
This repository was archived by the owner on Jul 11, 2021. It is now read-only.
This repository was archived by the owner on Jul 11, 2021. It is now read-only.

Built-in function names should be excluded from item names #73

@kosiakk

Description

@kosiakk

It is possible to define a functor, which shares the name with built-in function. But the built-in function always takes precedence:

:-backchain whatever/1 .
:-backchain abs/1 .
whatever(X) = "hello".
abs(X)      = "hello".  // I'd expect a compiler error here
test1 = whatever(-4).
test2 = abs(-4) .

Changes
=======
test1 = "hello".
test2 = 4.

Since the list of built-in function differs between backends, I'd make it a compiler error to define an item which clashes with built-in function. Regardless of arity, to be on the safe side.

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