Skip to content

Instantly share code, notes, and snippets.

@btab
Created December 11, 2016 20:20
Show Gist options
  • Save btab/a9c63828cbc3858f7a350faa8c02c974 to your computer and use it in GitHub Desktop.
Save btab/a9c63828cbc3858f7a350faa8c02c974 to your computer and use it in GitHub Desktop.
class Bar
let string: String
new create() =>
string = "bar"
class Foo
let string: String = "foo"
actor Main
new create(env: Env) =>
let b1 = Bar
let b2: Bar = Bar
let f1 = Foo
let f2: Foo = Foo
useBar(b1) // fine
useBar(b2) // fine
useFoo(f1) // Foo iso! is not a subtype of Foo ref: iso! is not a subtype of ref
useFoo(f2) // fine
fun useBar(b: Bar ref) =>
true
fun useFoo(f: Foo ref) =>
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment