CodeusTech / CodeusTech/Xita

Type Check: If Then Else

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
prebug
Dominant language
C++
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

`if p then e1 else e2`

If ... then ... else ... expressions need to be type checked to meet the following criteria:
* `p`: Boolean Value
* `e1`: Type0
* `e2`: Type0

`p` must be a boolean value (or castable to boolean). `e1` and `e2` can be any valid expressions, as long as their types match.

If `e1` and `e2` are not equivalent types, a type checking error should be thrown to cross-compiling environment.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.