-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from MercuryTechnologies/kb/public-swift
Make swift types public and deprecations prettier
- Loading branch information
Showing
46 changed files
with
132 additions
and
151 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
enum Enum: String, CaseIterable, Hashable, Codable { | ||
public enum Enum: String, CaseIterable, Hashable, Codable { | ||
case a | ||
case b | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct Newtype: CaseIterable, Hashable, Codable { | ||
typealias NewtypeTag = Tagged<Newtype, String> | ||
let value: NewtypeTag | ||
public struct Newtype: CaseIterable, Hashable, Codable { | ||
public typealias NewtypeTag = Tagged<Newtype, String> | ||
public let value: NewtypeTag | ||
} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
struct Newtype { | ||
var newtypeField: Enum | ||
public struct Newtype { | ||
public var newtypeField: Enum | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct Data: CaseIterable, Hashable, Codable { | ||
var field0: Int | ||
var field1: Int? | ||
public struct Data: CaseIterable, Hashable, Codable { | ||
public var field0: Int | ||
public var field1: Int? | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
enum Enum { | ||
public enum Enum { | ||
case a | ||
case b | ||
case c | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
enum Enum { | ||
public enum Enum { | ||
case a | ||
case b | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct Newtype { | ||
typealias NewtypeTag = Tagged<Newtype, Int?> | ||
let value: NewtypeTag? | ||
public struct Newtype { | ||
public typealias NewtypeTag = Tagged<Newtype, Int?> | ||
public let value: NewtypeTag? | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct Newtype { | ||
typealias NewtypeTag = Tagged<Newtype, String> | ||
let value: NewtypeTag | ||
public struct Newtype { | ||
public typealias NewtypeTag = Tagged<Newtype, String> | ||
public let value: NewtypeTag | ||
} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
struct Newtype { | ||
var newtypeField: String | ||
public struct Newtype { | ||
public var newtypeField: String | ||
} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
struct Newtype { | ||
var newtypeField: Result<Int, String> | ||
public struct Newtype { | ||
public var newtypeField: Result<Int, String> | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct Data { | ||
var field0: Int | ||
var field1: Int? | ||
public struct Data { | ||
public var field0: Int | ||
public var field1: Int? | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
struct Data: Hashable, Codable {} | ||
public struct Data: Hashable, Codable {} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
struct Data<A: Hashable & Codable>: Hashable, Codable {} | ||
public struct Data<A: Hashable & Codable>: Hashable, Codable {} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
struct Data { | ||
var field0: Int | ||
// Deprecated since build 500 | ||
// var field1: Int? | ||
public struct Data { | ||
public var field0: Int | ||
// Deprecated since build 500 | ||
// public var field1: Int? | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
typealias TreeResponse = Tree | ||
public typealias TreeResponse = Tree |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct LTree<A: Hashable & Codable>: Hashable, Codable { | ||
typealias LTreeTag = Tagged<LTree, [A]> | ||
let value: LTreeTag | ||
public struct LTree<A: Hashable & Codable>: Hashable, Codable { | ||
public typealias LTreeTag = Tagged<LTree, [A]> | ||
public let value: LTreeTag | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct Tree<A: Hashable & Codable>: Hashable, Codable { | ||
var rootLabel: A | ||
var subForest: [Tree<A>] | ||
public struct Tree<A: Hashable & Codable>: Hashable, Codable { | ||
public var rootLabel: A | ||
public var subForest: [Tree<A>] | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct Data<A: Hashable & Codable, B: Hashable & Codable>: CaseIterable, Hashable, Codable { | ||
var field0: A | ||
var field1: B | ||
public struct Data<A: Hashable & Codable, B: Hashable & Codable>: CaseIterable, Hashable, Codable { | ||
public var field0: A | ||
public var field1: B | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/// Record 0 with duplicate fields | ||
struct Data0 { | ||
var field0: Int | ||
public struct Data0 { | ||
public var field0: Int | ||
/// not a duplicate | ||
var field1: Int? | ||
public var field1: Int? | ||
} |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/// Documentation for ``Record0``. | ||
struct Record0: CaseIterable, Hashable, Codable { | ||
public struct Record0: CaseIterable, Hashable, Codable { | ||
/// The zeroth field of record 0 | ||
var record0Field0: Int | ||
public var record0Field0: Int | ||
/// The first field of record 0 | ||
var record0Field1: Int | ||
public var record0Field1: Int | ||
} |
6 changes: 3 additions & 3 deletions
6
.golden/swiftRecord0SumOfProductWithTaggedFlatObjectStyleSpec/golden
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct Record0: Codable { | ||
var record0Field0: Int | ||
var record0Field1: Int | ||
public struct Record0: Codable { | ||
public var record0Field0: Int | ||
public var record0Field1: Int | ||
} |
6 changes: 3 additions & 3 deletions
6
.golden/swiftRecord0SumOfProductWithTaggedObjectStyleSpec/golden
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct Record0: Codable { | ||
var record0Field0: Int | ||
var record0Field1: Int | ||
public struct Record0: Codable { | ||
public var record0Field0: Int | ||
public var record0Field1: Int | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/// Record 1 with duplicate fields | ||
struct Data1 { | ||
var field0: String | ||
public struct Data1 { | ||
public var field0: String | ||
/// not a duplicate | ||
var field2: String? | ||
public var field2: String? | ||
} |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/// Documentation for ``Record1``. | ||
struct Record1: CaseIterable, Hashable, Codable { | ||
public struct Record1: CaseIterable, Hashable, Codable { | ||
/// The zeroth field of record 1 | ||
var record1Field0: Int | ||
public var record1Field0: Int | ||
/// The first field of record 1 | ||
var record1Field1: Int | ||
public var record1Field1: Int | ||
} |
6 changes: 3 additions & 3 deletions
6
.golden/swiftRecord1SumOfProductWithTaggedFlatObjectStyleSpec/golden
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct Record1: Codable { | ||
var record1Field0: Int | ||
var record1Field1: Int | ||
public struct Record1: Codable { | ||
public var record1Field0: Int | ||
public var record1Field1: Int | ||
} |
6 changes: 3 additions & 3 deletions
6
.golden/swiftRecord1SumOfProductWithTaggedObjectStyleSpec/golden
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
struct Record1: Codable { | ||
var record1Field0: Int | ||
var record1Field1: Int | ||
public struct Record1: Codable { | ||
public var record1Field0: Int | ||
public var record1Field1: Int | ||
} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
enum EnumA { | ||
public enum EnumA { | ||
case enumFirst | ||
} |
Oops, something went wrong.