Skip to content

Disallow re-aliasing of built-in types #235

@gerau

Description

@gerau

Project

compiler

What happened?

After introducing the chumsky parser, built-in type definitions were moved out of the grammar itself. While this is an good thing, the compiler no longer throws an error for assignments like this:

type Ctx8 = u8;

In the previous parser, this behavior was disallowed:

   |
13 | type Ctx8 = u32;
   |      ^ Grammar error: unexpected builtin_alias

Note that when assigning a built-in type alias, it does not change the type, so it essentially does nothing. However, I would rather prevent users from typing this at all.

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