Forked from onmyway133/Init in protocol extension.swift
Created
January 9, 2018 02:00
-
-
Save XuYanci/f7ec48354da22436a6461706e50c3818 to your computer and use it in GitHub Desktop.
Init in protocol extension.swift
This file contains hidden or 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
protocol P { | |
init() | |
} | |
extension P { | |
init(something: AnyObject) { | |
self.init() | |
print("P") | |
} | |
} | |
struct A: P { | |
init() { | |
print("A") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment