We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apple Swift version 3.1 (swiftlang-802.0.48 clang-802.0.38) Target: x86_64-apple-macosx10.9
md5: 42a378d04d904542f3c68d7e566ba2b2
duplicates:
relates to:
Issue Description:
Extending a generic nested type in a separate file fails with an error stating that the nested type isn't a member of the type it is nested in.
Example
Given the following two files:
genericSubtypesBase.swift
public struct BaseType {} public extension BaseType { public struct SubType<T> {} }
genericSubtypesExtension.swift
public extension BaseType.SubType {}
compiling them with swiftc -v genericSubtypesExtension.swift genericSubtypesBase.swift gives the following output:
swiftc -v genericSubtypesExtension.swift genericSubtypesBase.swift
Apple Swift version 3.1 (swiftlang-802.0.48 clang-802.0.38) Target: x86_64-apple-macosx10.9 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file genericSubtypesExtension.swift genericSubtypesBase.swift -target x86_64-apple-macosx10.9 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -color-diagnostics -module-name main -o /var/folders/0z/101fmx1n5hl3g6l0vrn5g9qh0000gn/T/genericSubtypesExtension-14e4ba.o genericSubtypesExtension.swift:1:27: error: 'SubType' is not a member type of 'BaseType' public extension BaseType.SubType {}
Note This error can also be reproduced by adding the two files to a new Framework Project in Xcode and hit Build.
The text was updated successfully, but these errors were encountered:
Probably the same as SR-631, but the "generic" might be an extra wrinkle.
Sorry, something went wrong.
At least the workaround (to move the file defining BaseType and SubType before the one extending SubType) works in this case as well.
BaseType
SubType
It's the same 😉
slavapestov
No branches or pull requests
Environment
Apple Swift version 3.1 (swiftlang-802.0.48 clang-802.0.38)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: 42a378d04d904542f3c68d7e566ba2b2
duplicates:
relates to:
Issue Description:
Extending a generic nested type in a separate file fails with an error stating that the nested type isn't a member of the type it is nested in.
Example
Given the following two files:
genericSubtypesBase.swift
genericSubtypesExtension.swift
compiling them with
swiftc -v genericSubtypesExtension.swift genericSubtypesBase.swift
gives the following output:Note
This error can also be reproduced by adding the two files to a new Framework Project in Xcode and hit Build.
The text was updated successfully, but these errors were encountered: