Skip to content

Instantly share code, notes, and snippets.

@bshepherdson
Created May 25, 2016 14:50
Show Gist options
  • Save bshepherdson/ef42eb5925cff67345d9b6ddccdd0b6d to your computer and use it in GitHub Desktop.
Save bshepherdson/ef42eb5925cff67345d9b6ddccdd0b6d to your computer and use it in GitHub Desktop.
Internal error not reported when Pony object literal has undefined internal fields
actor Main
new create(env: Env) =>
var o = bar()
var s: String val = recover val
var t: String ref = String()
t.concat(consume o)
t
end
env.out.print(s)
fun bar(): Iterator[U8] iso^ =>
recover object is Iterator[U8]
var _iter: Iterator[U8] // Broken
//var _iter: Iterator[U8] = "foo".values() // Works
fun ref has_next(): Bool => _iter.has_next()
fun ref next(): U8 ? => _iter.next()
end end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment