Skip to content

Releases: magic-lang/rock

Initial value in enums now default to 0

24 Nov 09:31
Compare
Choose a tag to compare
  • 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

06 Nov 14:08
Compare
Choose a tag to compare

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

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)

29 Oct 11:07
Compare
Choose a tag to compare
Merge pull request #23 from thomasfanell/master

rock now prints the absolute path upon error(s)

Debian package for rock_1.0.9

01 Oct 07:48
Compare
Choose a tag to compare

TString operator t"" added.

Debian package for rock_1.0.8

20 Aug 11:35
Compare
Choose a tag to compare

Updated with commits from master.

Debian package for rock_1.0.7

08 Jun 12:29
Compare
Choose a tag to compare

Now possible to override abstract function.

Debian package for rock_1.0.6

26 May 12:15
Compare
Choose a tag to compare

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

23 Apr 11:20
Compare
Choose a tag to compare

With stack alloc.

Debian package for rock_1.0-4

16 Mar 08:05
Compare
Choose a tag to compare

With fancy backtrace.

Debian package for rock_1.0-3

03 Mar 13:44
Compare
Choose a tag to compare
Added general compiler flags to Android make file.