Skip to content

[NFC] Improve Nested Types Table Test #29517

New issue

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

Merged
merged 1 commit into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/Serialization/Inputs/nested-type-with-overlay/overlay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,13 @@ extension Base {
}

public var shadowedFromSwift = Base.NestedAndShadowed(dummy: ())

public struct CustomError {
public struct Code : RawRepresentable {
public let rawValue: Int

public init(rawValue: Int) {
self.rawValue = rawValue
}
}
}
10 changes: 8 additions & 2 deletions test/Serialization/nested-type-with-overlay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

// REQUIRES: asserts

// CHECK: 3 Serialization - # of nested types resolved without full lookup
// Unfortunately this isn't 4 because of the shadowed nested type from Clang.
// CHECK: 4 Serialization - # of nested types resolved without full lookup
// Unfortunately this isn't 5 because of the shadowed nested type from Clang.

import HasOverlay

Expand All @@ -20,3 +20,9 @@ public func resolveNestedTypes(

public var shadowedFromClang = getShadowedFromClang()
public var shadowedFromSwift = HasOverlay.shadowedFromSwift

extension CustomError.Code {
public static var failedSuccessfully: CustomError.Code {
return CustomError.Code(rawValue: -9999)
}
}