Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

Make Typer available in OpaqueExpressionGenerator #540

@afd

Description

@afd

Currently OpaqueExpressionGenerator does not have access to a Typer field, making it had to implement transformations such as #511.

Typer should be added as a field of OpqaueExpressionGenerator and passed into its constructor.

All functions that take both an expr and the expected BasicType of the expr should have the BasicType argument removed, and instead should get the expr's type from the typer, assert that it is a BasicType and downcast it to the BasicType.

This will end up requiring quite a lot of changes in the code base because OpaqueExpressionGenerators get created in contexts where a Typer is not readily available, so a Typer will need to be passed through to those contexts.

There is also at least one test where OpaqueExpressionGenerator is used to construct an AST; this test (and any others like it) will need to be re-worked.

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