Skip to content

Bitwise OR Type Union support in TIFA #160

@acbart

Description

@acbart

The TIFA type checker in Pedal performs a simplistic type check by traversing the students' code. The type system (pedal/types) has support for TypeUnion, but this is only for cases where the type is ambiguous. We should support both the bitwise or (|) operator and the typing module's Union and Optional types. This will require working with the visit_binop and apply_binary_operation functions. Although in theory we could augment the VALID_BINOP_TYPES lookup table, I think it will be better to have specialized behavior in the case of this operator, since it needs to interact with a wide array of types. Please implement all the necessary functionality to make type unions work correctly in TIFA.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions