[SR-4568] Extension of a nested type defined in a separate source file fails to compile #47145
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Environment
macOS Sierra 10.12.4 (16E195)
Xcode 8.3.1 (8E1000a)
Apple Swift version 3.1 (swiftlang-802.0.51 clang-802.0.41)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: fd382991533b26beb2b81391e4587b9c
duplicates:
Issue Description:
Problem:
The example below compiles fine only in case of the right source files order
Workaround:
In Xcode: Build Phases -> Compile Sources:
Make sure the source with nested type we gonna extend (Zoo.swift) is above the extension contained source (Zoo+CageSize.swift)
Generated error message:
Sources:
The text was updated successfully, but these errors were encountered: