Skip to content

Instantly share code, notes, and snippets.

@Praetonus
Created October 16, 2016 16:32
Show Gist options
  • Save Praetonus/d6e7143b1bd90f1ce860e51893c635d9 to your computer and use it in GitHub Desktop.
Save Praetonus/d6e7143b1bd90f1ce860e51893c635d9 to your computer and use it in GitHub Desktop.
class Foo
var i: USize = 0
fun ref boom() => i = 3
actor Main
new create(env: Env) =>
let a: Foo val = Foo
env.out.print(a.i.string())
bla[Foo val](a)
env.out.print(a.i.string())
fun bla[A: Foo #read](x: A) =>
x.boom()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment