Skip to content

Known Issues

John Wilkes edited this page Mar 13, 2022 · 31 revisions

Operators && and || have the same precedence

Note: Need to research how precedence and associativity differs from order of evaluation.

C++ links describing the 2:

Numeric literals' sizes are not checked

var x i64 = 123456789123456789123456789;

Unary expressions are not evaluated for integer literals

# This will not compile
var a i8 = !200;

Cannot assign min signed integer value

# This will not compile
var err i8 = -128;

Empty for loop will not compile

for i in r { }

Struct types cannot be used in global constants

# This will not compile
struct S { }
const SPtr = &S;

Cannot use a type expression when initializing a struct

# This will not compile
var s = StructTypes[0] { };

LLVM folds constants differently than the compiler

Evaluate constants instead of generating IR

# This prints 0 instead of -46
printi(cast(i8, 1234.0));