Change cast and int rules: constant folding always starts. Promotion using left side on all operands to bit width. Implicit narrowing to max size on right hand side.

This commit is contained in:
Christoffer Lerno
2021-03-15 16:44:09 +01:00
committed by Christoffer Lerno
parent 8a7f37e4d3
commit 07595df412
52 changed files with 1553 additions and 1462 deletions

View File

@@ -13,6 +13,6 @@ func void test2()
func void test3()
{
uint myUInt = 1;
int* p2 = cast(myUInt as int*);
int* p2 = cast(myUInt as int*); // #error: Cannot cast 'uint' to 'int*'.
}