Skip to content

Instantly share code, notes, and snippets.

@mfelsche
Created April 3, 2017 18:57
Show Gist options
  • Save mfelsche/0848bbdc1edb1cdd340b6fef741b0d82 to your computer and use it in GitHub Desktop.
Save mfelsche/0848bbdc1edb1cdd340b6fef741b0d82 to your computer and use it in GitHub Desktop.
actor Main
new create(env: Env) =>
let yep: Array[U32] = [1]
let nope: Array[U32] = [1, 2]
@mfelsche
Copy link
Author

mfelsche commented Apr 3, 2017

This does not compile with ponyc:

ponyc --version
0.12.3-5a68e92 [release]
compiled with: llvm 3.9.1 -- gcc-6 (Ubuntu 6.2.0-3ubuntu11~14.04) 6.2.0 20160901

error:

ponyc --debug .
Building builtin -> /usr/lib/pony/0.12.3-3147.5a68e92/packages/builtin
Building . -> /home/mwahl/dev/pony/array_lit
Error:
/home/mwahl/dev/pony/array_lit/array_lit.pony:4:32: syntax error: unterminated array literal
        let nope: Array[U32] = [1, 2]
                               ^
    Info:
    /home/mwahl/dev/pony/array_lit/array_lit.pony:4:34: expected terminating ] before here
            let nope: Array[U32] = [1, 2]

@mfelsche
Copy link
Author

mfelsche commented Apr 3, 2017

it does not compile because of: ponylang/ponyc@73cb823

it should be

let thatsright: Array[U32] = [1; 2]

@SeanTAllen
Copy link

did you find documentation that didn't get updated after the array literal change? if yes, can you open an issue for it so we can update? thanks.

@mfelsche
Copy link
Author

mfelsche commented Apr 8, 2017

@SeanTAllen i already created a pull request ponylang/pony-tutorial#189

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment