Thanks for the help endecotp.
I found the issue: my source file was included in multiple target dependencies and one of them wasn't using the Swift compiler. Found it by looking at the build transcript.
I'll see if I can get the member variable thing working now, and will post a solution.
As is often the case, the problem wasn't where I thought it was :)
Topic:
Programming Languages
SubTopic:
Swift