Releases: magic-lang/rock
Releases · magic-lang/rock
Initial value in enums now default to 0
- The initial value of an enum now defaults to 0
SimpleEnum: enum {
Foo, // 0
Bar // 1
}
CustomIncrement: enum (+2) {
Foo, // 0
Bar, // 2
Moo // 4
}
// Values will always be zero
CustomIncrementMultiplyWrong: enum (*2) {
Foo, // 0
Bar // 0
}
// Set an initial value
CustomIncrementMultiplyCorrect: enum (*2) {
Foo = 1, // 1
Bar, // 2
Moo, // 4
Koo // 8
}
Type inference improvements and null-coalescing operator bugfix
Notable changes:
- Improvements in type inference
- null-coalescing operator is no longer evaluating the LHS twice
- usage:
moo := foo ?? bar // if foo is null, set moo to bar
- usage:
In some cases, we are still required to qualify S
, such as when S
is used in an argument in a Func
:
// this works
map: func <S> (function: Func(T) -> S) -> S
// error Not enough info to resolve return type S of function call
fold: func <S> (function: Func(T, S) -> S, initial: S) -> S
// this works
fold: func <S> (S: Class, function: Func(T, S) -> S, initial: S) -> S
Prints the absolute path upon error(s)
Merge pull request #23 from thomasfanell/master rock now prints the absolute path upon error(s)
Debian package for rock_1.0.9
TString operator t"" added.
Debian package for rock_1.0.8
Updated with commits from master.
Debian package for rock_1.0.7
Now possible to override abstract function.
Debian package for rock_1.0.6
Warnings for unknown version names are no longer displayed by default. Rock flag - versionwarning will make rock display them.
Debian package for rock_1.0-5
With stack alloc.
Debian package for rock_1.0-4
With fancy backtrace.
Debian package for rock_1.0-3
Added general compiler flags to Android make file.