Skip to content

Instantly share code, notes, and snippets.

@felixangell
Created March 1, 2016 16:22
Show Gist options
  • Save felixangell/d0f541a30d1abc9c40f7 to your computer and use it in GitHub Desktop.
Save felixangell/d0f541a30d1abc9c40f7 to your computer and use it in GitHub Desktop.
ark fun
felix@felix-arch ~/d/a/idiot> ls
main* main.ark
felix@felix-arch ~/d/a/idiot> cat main.ark
#use std::mem
pub func main() -> int {
foo := "bar";
length := len(foo) + 1;
bar: [length]u8;
baz := bar[0];
return 0;
}
felix@felix-arch ~/d/a/idiot> ark build -I $GOPATH/src/github.com/ark-lang/ark/lib/ main.ark
error: [main:7:12] Cannot index non-array type `u8`
baz := bar[0];
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment