- Change distinct -> typedef.

- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
This commit is contained in:
Christoffer Lerno
2025-03-15 15:21:55 +01:00
committed by Christoffer Lerno
parent fc5615a7a1
commit 5c77c9a754
221 changed files with 649 additions and 684 deletions

View File

@@ -1,17 +1,17 @@
module math_tests @test;
import math_tests::complex;
alias ComplexDouble = ComplexType{double} @local;
alias ComplexInt = ComplexType{int} @local;
alias ComplexDouble @local = ComplexType {double};
alias ComplexInt @local = ComplexType {int};
module math_tests::complex{ElementType} @test;
module math_tests::complex {ElementType} @test;
import std::math;
alias ComplexType = Complex{ElementType};
alias ComplexType = Complex {ElementType};
fn void complex_mul_imaginary()
{
ComplexType i = complex::IMAGINARY{ElementType};
ComplexType i = complex::IMAGINARY {ElementType};
assert(i.mul(i).equals((ComplexType){-1, 0}));
assert(i.mul(i).mul(i).equals((ComplexType){0, -1}));
}