Skip to content

Instantly share code, notes, and snippets.

@T-Pham T-Pham/M.swift
Created Apr 24, 2019

Embed
What would you like to do?
M object
@dynamicMemberLookup
@dynamicCallable
struct M {
subscript(dynamicMember member: String) -> M {
get {
return self
}
set {
}
}
func dynamicallyCall(withKeywordArguments: [String: Any?]) -> M {
return self
}
}
let m = M()
m.fsdfsdfsdf.3424234.2343(234, sdfsdfsd: "sdfsdf", sdfsdf: 324324234).23432.dfsdfsdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.