nddrylliog/rock — pull request #380 by shamanas (2012-05-12 15:02:19+00:00)
Title: Added namespace types, regenerated latest nagaqueen

Closes #46
Note that there is room for improving, namely by removing the need for parenthesis in every case but rather limiting it to cases where it is clearer, as when used in casting expressions.

This is a test that compiles:

import io/File into IO
import structs/[ArrayList, HashBag] into AL

f: func -> (IO File) {
IO File new("whatever")
}

e: func(foo: (AL HashBag), bar: (AL ArrayList)) -> (IO File) {
f()
}

g: func -> Func((AL HashBag), (AL ArrayList)) -> (IO File) { e }

h: func -> (AL ArrayList) {
[1,2,3] as (AL ArrayList)
}

obj: Object
file: (IO File) = obj as (IO File)