Swift class with protocol static function compile error

Originator:keithbsmiley
Number:rdar://23718307 Date Originated:01-Dec-2015 07:58 PM
Status:Duplicate of 23671426 (open) Resolved:
Product:Developer Tools Product Version:Swift 2.1
Classification:Other Bug Reproducible:Always
 
Summary:

When you have a non-final class conforming to a protocol that contains
an initializer and a static function returning `Self`. If you add a
protocol extension implementing the static function, you cannot compile
the class.

Steps to reproduce:

1. Attempt to compile the example file with
  `swift NonFinalClassProtocolInitializer.swift`

Expected results:

Everything compiles correctly, and the static function calls through the
initializer on the class no problem.

Actual results:

A compiler error is produced.

Notes:

- Everything works fine with structs
- Everything works fine with `final` classes
- Uncomment the static function override in the example for it to
  compile fine.

Comments

https://github.com/keith/radars/tree/master/NonFinalClassProtocolInitializer

By keithbsmiley at Dec. 2, 2015, 3:59 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!