swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.3k stars 10.34k forks source link

[SR-14047] Swift 5.3 Compiler generates potentially ambiguous types in extensions in swiftinterface files #56438

Open swift-ci opened 3 years ago

swift-ci commented 3 years ago
Previous ID SR-14047
Radar rdar://problem/73204078
Original Reporter plinth666 (JIRA User)
Type Bug
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 5ffcd2348c458d5c143ca6102c9cff00

Issue Description:

Given the following code:

import Swift
extension Double {
{{ public func DoubleIt () -> Double }}{

{{ return self * 2}}

    }

{{}}}

This generates the following swiftinterface file:

// swift-interface-format-version: 1.0

// swift-compiler-version: Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)

// swift-module-flags: -target x86_64-apple-macosx10.9 -enable-objc-interop -enable-library-evolution -module-name ExtensionTests

import Swift

extension Double {

{{ public func DoubleIt() -> Swift.Double}}

{{}}}

Note that the return type is fully qualified but the extension type is not.

The extension type should be fully qualified as well.

typesanitizer commented 3 years ago

@swift-ci create