Created
December 11, 2016 20:20
-
-
Save btab/a9c63828cbc3858f7a350faa8c02c974 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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