-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix redundant public accessibility analysis false-positive for inheri…
…ted and default associated types, closes #689
- Loading branch information
Showing
9 changed files
with
62 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...ssibilityTests/AccessibilityProject/Sources/TargetA/PublicAssociatedTypeDefaultType.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Foundation | ||
|
||
public protocol PublicInheritedAssociatedTypeDefaultType {} | ||
|
||
public protocol PublicInheritedAssociatedTypeDefaultTypeProtocol { | ||
associatedtype Value = PublicInheritedAssociatedTypeDefaultType | ||
|
||
var items: [Value] { get } | ||
} | ||
|
||
public class PublicInheritedAssociatedTypeDefaultTypeClass: PublicInheritedAssociatedTypeDefaultTypeProtocol { | ||
public init() {} | ||
public let items: [Int] = [] | ||
} |
16 changes: 16 additions & 0 deletions
16
...cessibilityTests/AccessibilityProject/Sources/TargetA/PublicInheritedAssociatedType.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Foundation | ||
|
||
public protocol PublicInheritedAssociatedType {} | ||
|
||
public protocol PublicInheritedAssociatedTypeProtocol { | ||
associatedtype Value: PublicInheritedAssociatedType | ||
|
||
var items: [Value] { get } | ||
} | ||
|
||
public class PublicInheritedAssociatedTypeClass: PublicInheritedAssociatedTypeProtocol { | ||
public init() {} | ||
public let items: [Int] = [] | ||
} | ||
|
||
extension Int: PublicInheritedAssociatedType {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters