mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If a module has the same `public-module-name` as the module being generated and its import is exported, merge it into the same generated interface. Fix various always-imported modules from being printed while here and update all the tests that checked for them. Resolves rdar://137887712.
509 lines
16 KiB
Plaintext
509 lines
16 KiB
Plaintext
func fooSubFunc1(_ a: Int32) -> Int32
|
|
|
|
struct FooSubEnum1 : Hashable, Equatable, RawRepresentable {
|
|
|
|
init(_ rawValue: UInt32)
|
|
|
|
init(rawValue rawValue: UInt32)
|
|
|
|
var rawValue: UInt32
|
|
|
|
@inlinable var hashValue: Int { get }
|
|
|
|
@inlinable func hash(into hasher: inout Hasher)
|
|
|
|
static func != (_ lhs: FooSubEnum1, _ rhs: FooSubEnum1) -> Bool
|
|
}
|
|
|
|
var FooSubEnum1X: FooSubEnum1 { get }
|
|
|
|
var FooSubEnum1Y: FooSubEnum1 { get }
|
|
|
|
var FooSubUnnamedEnumeratorA1: Int { get }
|
|
|
|
|
|
[
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 0,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 5,
|
|
key.length: 11
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 17,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 19,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int32",
|
|
key.usr: "s:s5Int32V",
|
|
key.offset: 22,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int32",
|
|
key.usr: "s:s5Int32V",
|
|
key.offset: 32,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 39,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 46,
|
|
key.length: 11
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "Hashable",
|
|
key.usr: "s:SH",
|
|
key.offset: 60,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "Equatable",
|
|
key.usr: "s:SQ",
|
|
key.offset: 70,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "RawRepresentable",
|
|
key.usr: "s:SY",
|
|
key.offset: 81,
|
|
key.length: 16
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 105,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 110,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 112,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "UInt32",
|
|
key.usr: "s:s6UInt32V",
|
|
key.offset: 122,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 135,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 140,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 149,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "UInt32",
|
|
key.usr: "s:s6UInt32V",
|
|
key.offset: 159,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 172,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 176,
|
|
key.length: 8
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "UInt32",
|
|
key.usr: "s:s6UInt32V",
|
|
key.offset: 186,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 198,
|
|
key.length: 10
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 209,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 213,
|
|
key.length: 9
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 224,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 230,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.attribute.builtin,
|
|
key.offset: 241,
|
|
key.length: 10
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 252,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 257,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 262,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 267,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 275,
|
|
key.length: 5
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Hasher",
|
|
key.usr: "s:s6HasherV",
|
|
key.offset: 281,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 294,
|
|
key.length: 6
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 301,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.operator,
|
|
key.offset: 306,
|
|
key.length: 2
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 310,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 312,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "FooSubEnum1",
|
|
key.usr: "c:@E@FooSubEnum1",
|
|
key.offset: 317,
|
|
key.length: 11
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.argument,
|
|
key.offset: 330,
|
|
key.length: 1
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.parameter,
|
|
key.offset: 332,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "FooSubEnum1",
|
|
key.usr: "c:@E@FooSubEnum1",
|
|
key.offset: 337,
|
|
key.length: 11
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Bool",
|
|
key.usr: "s:Sb",
|
|
key.offset: 353,
|
|
key.length: 4
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 361,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 365,
|
|
key.length: 12
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "FooSubEnum1",
|
|
key.usr: "c:@E@FooSubEnum1",
|
|
key.offset: 379,
|
|
key.length: 11
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 393,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 400,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 404,
|
|
key.length: 12
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "FooSubEnum1",
|
|
key.usr: "c:@E@FooSubEnum1",
|
|
key.offset: 418,
|
|
key.length: 11
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 432,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 439,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.identifier,
|
|
key.offset: 443,
|
|
key.length: 25
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.struct,
|
|
key.name: "Int",
|
|
key.usr: "s:Si",
|
|
key.offset: 470,
|
|
key.length: 3
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.syntaxtype.keyword,
|
|
key.offset: 476,
|
|
key.length: 3
|
|
}
|
|
]
|
|
[
|
|
{
|
|
key.kind: source.lang.swift.decl.function.free,
|
|
key.name: "fooSubFunc1(_:)",
|
|
key.usr: "c:@F@fooSubFunc1",
|
|
key.offset: 0,
|
|
key.length: 37,
|
|
key.fully_annotated_decl: "<decl.function.free><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>fooSubFunc1</decl.name>(<decl.var.parameter><decl.var.parameter.argument_label>_</decl.var.parameter.argument_label> <decl.var.parameter.name>a</decl.var.parameter.name>: <decl.var.parameter.type><ref.struct usr=\"s:s5Int32V\">Int32</ref.struct></decl.var.parameter.type></decl.var.parameter>) -> <decl.function.returntype><ref.struct usr=\"s:s5Int32V\">Int32</ref.struct></decl.function.returntype></decl.function.free>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "_",
|
|
key.name: "a",
|
|
key.offset: 22,
|
|
key.length: 5
|
|
}
|
|
],
|
|
key.modulename: "Foo.FooSub"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.struct,
|
|
key.name: "FooSubEnum1",
|
|
key.usr: "c:@E@FooSubEnum1",
|
|
key.offset: 39,
|
|
key.length: 320,
|
|
key.fully_annotated_decl: "<decl.struct><syntaxtype.keyword>struct</syntaxtype.keyword> <decl.name>FooSubEnum1</decl.name> : <ref.protocol usr=\"s:SH\">Hashable</ref.protocol>, <ref.protocol usr=\"s:SQ\">Equatable</ref.protocol>, <ref.protocol usr=\"s:SY\">RawRepresentable</ref.protocol></decl.struct>",
|
|
key.conforms: [
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "Hashable",
|
|
key.usr: "s:SH"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "Equatable",
|
|
key.usr: "s:SQ"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.ref.protocol,
|
|
key.name: "RawRepresentable",
|
|
key.usr: "s:SY"
|
|
}
|
|
],
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.constructor,
|
|
key.name: "init(_:)",
|
|
key.usr: "s:So11FooSubEnum1VyABs6UInt32Vcfc",
|
|
key.offset: 105,
|
|
key.length: 24,
|
|
key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>_</decl.var.parameter.argument_label> <decl.var.parameter.name>rawValue</decl.var.parameter.name>: <decl.var.parameter.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "_",
|
|
key.name: "rawValue",
|
|
key.offset: 122,
|
|
key.length: 6
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.constructor,
|
|
key.name: "init(rawValue:)",
|
|
key.usr: "s:So11FooSubEnum1V8rawValueABs6UInt32V_tcfc",
|
|
key.offset: 135,
|
|
key.length: 31,
|
|
key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>rawValue</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "rawValue",
|
|
key.name: "rawValue",
|
|
key.offset: 159,
|
|
key.length: 6
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.var.instance,
|
|
key.name: "rawValue",
|
|
key.usr: "s:So11FooSubEnum1V8rawValues6UInt32Vvp",
|
|
key.offset: 172,
|
|
key.length: 20,
|
|
key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>rawValue</decl.name>: <decl.var.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.type></decl.var.instance>"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.var.instance,
|
|
key.name: "hashValue",
|
|
key.usr: "s:SYsSHRzSH8RawValueSYRpzrlE04hashB0Sivp::SYNTHESIZED::c:@E@FooSubEnum1",
|
|
key.original_usr: "s:SYsSHRzSH8RawValueSYRpzrlE04hashB0Sivp",
|
|
key.offset: 198,
|
|
key.length: 37,
|
|
key.fully_annotated_decl: "<decl.var.instance><syntaxtype.attribute.builtin><syntaxtype.attribute.name>@inlinable</syntaxtype.attribute.name></syntaxtype.attribute.builtin> <syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>hashValue</decl.name>: <decl.var.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> }</decl.var.instance>"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "hash(into:)",
|
|
key.usr: "s:SYsSHRzSH8RawValueSYRpzrlE4hash4intoys6HasherVz_tF::SYNTHESIZED::c:@E@FooSubEnum1",
|
|
key.original_usr: "s:SYsSHRzSH8RawValueSYRpzrlE4hash4intoys6HasherVz_tF",
|
|
key.offset: 241,
|
|
key.length: 47,
|
|
key.fully_annotated_decl: "<decl.function.method.instance><syntaxtype.attribute.builtin><syntaxtype.attribute.name>@inlinable</syntaxtype.attribute.name></syntaxtype.attribute.builtin> <syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>hash</decl.name>(<decl.var.parameter><decl.var.parameter.argument_label>into</decl.var.parameter.argument_label> <decl.var.parameter.name>hasher</decl.var.parameter.name>: <syntaxtype.keyword>inout</syntaxtype.keyword> <decl.var.parameter.type><ref.struct usr=\"s:s6HasherV\">Hasher</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.method.instance>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "into",
|
|
key.name: "hasher",
|
|
key.offset: 281,
|
|
key.length: 6
|
|
}
|
|
]
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.function.operator.infix,
|
|
key.name: "!=(_:_:)",
|
|
key.usr: "s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::c:@E@FooSubEnum1",
|
|
key.original_usr: "s:SQsE2neoiySbx_xtFZ",
|
|
key.doc.full_as_xml: "<Function><Name>!=(_:_:)</Name><USR>s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::c:@E@FooSubEnum1</USR><Declaration>static func != (lhs: FooSubEnum1, rhs: FooSubEnum1) -> Bool</Declaration><CommentParts><Abstract><Para>Returns a Boolean value indicating whether two values are not equal.</Para></Abstract><Parameters><Parameter><Name>lhs</Name><Direction isExplicit=\"0\">in</Direction><Discussion><Para>A value to compare.</Para></Discussion></Parameter><Parameter><Name>rhs</Name><Direction isExplicit=\"0\">in</Direction><Discussion><Para>Another value to compare.</Para></Discussion></Parameter></Parameters><Discussion><Para>Inequality is the inverse of equality. For any values <codeVoice>a</codeVoice> and <codeVoice>b</codeVoice>, <codeVoice>a != b</codeVoice> implies that <codeVoice>a == b</codeVoice> is <codeVoice>false</codeVoice>.</Para><Para>This is the default implementation of the not-equal-to operator (<codeVoice>!=</codeVoice>) for any type that conforms to <codeVoice>Equatable</codeVoice>.</Para></Discussion></CommentParts></Function>",
|
|
key.offset: 294,
|
|
key.length: 63,
|
|
key.fully_annotated_decl: "<decl.function.operator.infix><syntaxtype.keyword>static</syntaxtype.keyword> <syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>!= </decl.name>(<decl.var.parameter><decl.var.parameter.name>lhs</decl.var.parameter.name>: <decl.var.parameter.type><ref.struct usr=\"c:@E@FooSubEnum1\">FooSubEnum1</ref.struct></decl.var.parameter.type></decl.var.parameter>, <decl.var.parameter><decl.var.parameter.name>rhs</decl.var.parameter.name>: <decl.var.parameter.type><ref.struct usr=\"c:@E@FooSubEnum1\">FooSubEnum1</ref.struct></decl.var.parameter.type></decl.var.parameter>) -> <decl.function.returntype><ref.struct usr=\"s:Sb\">Bool</ref.struct></decl.function.returntype></decl.function.operator.infix>",
|
|
key.entities: [
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "_",
|
|
key.name: "lhs",
|
|
key.offset: 317,
|
|
key.length: 11
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.var.local,
|
|
key.keyword: "_",
|
|
key.name: "rhs",
|
|
key.offset: 337,
|
|
key.length: 11
|
|
}
|
|
]
|
|
}
|
|
],
|
|
key.modulename: "Foo.FooSub"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.var.global,
|
|
key.name: "FooSubEnum1X",
|
|
key.usr: "c:@E@FooSubEnum1@FooSubEnum1X",
|
|
key.offset: 361,
|
|
key.length: 37,
|
|
key.fully_annotated_decl: "<decl.var.global><syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>FooSubEnum1X</decl.name>: <decl.var.type><ref.struct usr=\"c:@E@FooSubEnum1\">FooSubEnum1</ref.struct></decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> }</decl.var.global>",
|
|
key.modulename: "Foo.FooSub"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.var.global,
|
|
key.name: "FooSubEnum1Y",
|
|
key.usr: "c:@E@FooSubEnum1@FooSubEnum1Y",
|
|
key.offset: 400,
|
|
key.length: 37,
|
|
key.fully_annotated_decl: "<decl.var.global><syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>FooSubEnum1Y</decl.name>: <decl.var.type><ref.struct usr=\"c:@E@FooSubEnum1\">FooSubEnum1</ref.struct></decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> }</decl.var.global>",
|
|
key.modulename: "Foo.FooSub"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.decl.var.global,
|
|
key.name: "FooSubUnnamedEnumeratorA1",
|
|
key.usr: "c:@Ea@FooSubUnnamedEnumeratorA1@FooSubUnnamedEnumeratorA1",
|
|
key.offset: 439,
|
|
key.length: 42,
|
|
key.fully_annotated_decl: "<decl.var.global><syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>FooSubUnnamedEnumeratorA1</decl.name>: <decl.var.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> }</decl.var.global>",
|
|
key.modulename: "Foo.FooSub"
|
|
}
|
|
]
|