-
-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
Is your feature request related to a problem? Please describe.
A spy is currently unable to be generated for init
requirements. Any protocol with an init
requirement will not synthesize correctly.
Describe the solution you'd like
protocol Thing {
init(time: Double)
}
Should generate:
class ThingSpy: Thing {
init() {}
var initTimeReceivedTime: Double!
required init(time: Double) {
initTimeReceivedTime = time
}
}
Describe alternatives you've considered
N/A
Additional context
- A default
init
without any parameters should still be generated. - Only 1 value needs to be captured from the init requirements, because the object can only be created once.
init
protocol requirements must be prefixed with therequired
keyword.
rosswaredev, ibrahimyilmaz7, bryanrmq and nrgbodya
Metadata
Metadata
Assignees
Labels
No labels