Skip to content

Instantly share code, notes, and snippets.

@LeeKahSeng
Created August 4, 2017 03:56
Show Gist options
  • Save LeeKahSeng/433798a2c5286948dc58b4e53dd26357 to your computer and use it in GitHub Desktop.
Save LeeKahSeng/433798a2c5286948dc58b4e53dd26357 to your computer and use it in GitHub Desktop.
var testProtocol: MyProtocol = MyStruct()
testProtocol.myVar1 = "test var1" // No error
testProtocol.myVar2 = "test var2" // error: cannot assign to property: 'myVar2' is a get-only property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment