erg/crates/erg_compiler/tests/infer.er
Shunsuke Shibayama 4dcca2b06d fix(typechecker): type generalization & dereference bugs
* `Context::subtype_of` now has `allow_cast` param. If this is `false`, cast-aware comparisons are not performed.
2023-02-21 17:04:52 +09:00

13 lines
188 B
Python

id x = x
if__ cond, then, else = if cond, then, else
for__! i, proc! = for! i, proc!
add x, y = x + y
abs_ x = x.abs()
Norm = Trait { .norm = (self: Self) -> Nat }
norm x = x.norm()