diff --git a/metadata-generator/CMakeLists.txt b/metadata-generator/CMakeLists.txt
index 4ae9950df..bc57c05a8 100644
--- a/metadata-generator/CMakeLists.txt
+++ b/metadata-generator/CMakeLists.txt
@@ -69,5 +69,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
add_subdirectory(src)
+
+enable_testing()
+add_subdirectory(tests)
# copy build-step-metadata-generator.py to the bin folder
configure_file(build-step-metadata-generator.py ${CMAKE_CURRENT_BINARY_DIR}/bin/build-step-metadata-generator.py COPYONLY)
diff --git a/metadata-generator/README.md b/metadata-generator/README.md
index 899608a63..b0ee3f57a 100644
--- a/metadata-generator/README.md
+++ b/metadata-generator/README.md
@@ -46,3 +46,112 @@ Example command line arguments:
```
For a better way of generating these arguments, just run the TestRunner scheme on the v8ios-runtime project and get the arguments from the log.
+
+## Swift (Symbol Graph) support
+
+The generator can import Swift modules from symbol graphs (`*.symbols.json`, as
+written by `swiftc -emit-symbol-graph` or `swift symbolgraph-extract`). Graphs
+are loaded structurally into a Swift-specific IR (`src/Swift/SwiftIR.h`): every
+public declaration with its precise USR, kind, access level, parameters and
+labels, effects (`async`/`throws`), settability, generics, availability,
+extension info, and resolved relationships (members, conformances, superclass,
+overrides, protocol requirements). Malformed or unexpected input is reported as
+diagnostics with stable codes (`invalid-json`, `unsupported-format-version`,
+`duplicate-symbol`, `parameter-label-mismatch`, ...); errors make the generator
+exit non-zero.
+
+`--swift-thunk-output
` writes `+NativeScript.swift`: a Swift
+thunk for every declaration the runtime can call, plus the
+`ns_swift_register_` function the runtime looks up. `-output-typescript`
+writes `swift!.d.ts`, declaring exactly that surface as the
+`ns:swift/` module. Both come from the same registration model
+(`src/Swift/SwiftSurface.h`). See `docs/swift-interop.md` for the app-side
+workflow and the JavaScript semantics.
+
+### Capability classification and coverage
+
+Every declaration is classified into one tier, with machine-readable reasons
+for anything not generated (`src/Swift/CapabilityClassifier.h` lists the
+codes):
+
+| Tier | Meaning |
+|---|---|
+| `objc-direct` | Objective-C-visible (`c:` USR); served by the existing metadata runtime |
+| `swift-generated` | callable through a generated Swift thunk |
+| `swift-specialized` | needs an explicit generic specialization first |
+| `type-only` | representable in TypeScript, not callable (protocols, type aliases) |
+| `unsupported` | not bridgeable yet; `reasons` say why |
+| `not-applicable` | not an API surface (deinitializers, macros) |
+
+The generated surface currently bridges `Bool`, integer and floating-point
+types, `String`, optionals of those, module classes and actors (handles),
+module structs (boxed copies) and payload-less enums (case-name strings).
+
+`--swift-coverage-output ` writes `.coverage.json`: counts per
+tier and kind, a histogram of reasons, and every symbol's classification.
+`effectiveCallable` counts what is callable through either the Objective-C
+runtime or a thunk.
+
+### Compiler verification
+
+Symbol graphs do not carry every fact a call needs (e.g. `~Copyable` is often
+invisible), so the generated surface can be checked by the Swift compiler.
+`--swift-probe-output ` writes `.probe.swift`, which calls every
+generated declaration the way a thunk will, and a line map back to symbols.
+`--swift-verify` type-checks those probes, demotes every declaration the
+compiler rejects (`compiler-rejected:`), and repeats until the probes
+type-check:
+
+```
+./objc-metadata-generator --skip-objc \
+ --swift-symbolgraph-dir \
+ --swift-deployment-target 15.0 \
+ --swift-verify \
+ --swift-sdk "$(xcrun --sdk iphonesimulator --show-sdk-path)" \
+ --swift-target arm64-apple-ios15.0-simulator \
+ --swift-search-path \
+ --swift-coverage-output
+```
+
+`--swift-deployment-target` sets the version availability decisions are made
+against; it defaults to the minimum version recorded in the graphs, which
+`swift-symbolgraph-extract` sets to the SDK version.
+
+```
+./objc-metadata-generator \
+ -output-typescript \
+ --swift-symbolgraph-dir /symbolgraphs \
+ --swift-ir-output \
+ --skip-objc
+```
+
+- `--swift-symbolgraph-dir` – directory searched recursively for symbol graphs
+- `--swift-ir-output` – optional; writes `.swift-ir.json`, a deterministic dump of the IR
+- `--skip-objc` – skip the Objective-C phase
+
+Environment variables (if using build-step script):
+- `NS_SWIFT_SYMBOLGRAPH_DIR` (or `TNS_SWIFT_SYMBOLGRAPH_DIR`) – path to symbol graph directory
+- `NS_SKIP_OBJC_METADATA` (or `TNS_SKIP_OBJC_METADATA`) – set to `1` to skip Objective-C phase
+
+### Tests
+
+`swift-symbolgraph-tests` is built alongside the generator and runs against the
+checked-in graphs in `TestFixtures/SwiftDemo/symbolgraphs`, so it needs no Swift
+toolchain:
+
+```
+cmake --build build --target swift-symbolgraph-tests
+./build/bin/swift-symbolgraph-tests # or: (cd build && ctest)
+./build/bin/swift-symbolgraph-tests Snapshot # run tests whose name contains "Snapshot"
+```
+
+The snapshot tests (`IRSnapshot`, `TypeScriptSnapshot`, `CoverageSnapshot`,
+`ProbeSnapshot`) compare against `tests/swift/snapshots/`;
+`ThunkSourceMatchesFixtureInterop` keeps
+`TestFixtures/SwiftDemo/Interop/SwiftDemo+NativeScript.swift`, which TestRunner
+compiles, identical to the generator's output. `TypeScriptUsageCompiles` runs
+`tsc` (from `PATH` or `NS_TSC`) over `tests/swift/typescript/usage.ts`. `ProbesTypeCheck`
+and the `Verifier*` tests build the fixture module and run the Swift compiler;
+they are skipped when `xcrun` is unavailable. After an intended output change, regenerate them with
+`NS_UPDATE_SNAPSHOTS=1 ./build/bin/swift-symbolgraph-tests` and review
+the diff.
diff --git a/metadata-generator/TestFixtures/SwiftDemo/.gitignore b/metadata-generator/TestFixtures/SwiftDemo/.gitignore
new file mode 100644
index 000000000..14dfef462
--- /dev/null
+++ b/metadata-generator/TestFixtures/SwiftDemo/.gitignore
@@ -0,0 +1,23 @@
+# SwiftPM build artifacts
+.build/
+.swiftpm/
+
+# Generated symbol graphs, except the checked-in corpus the loader tests read
+.symbolgraph/
+*.symbolgraph
+*.symbols.json
+!symbolgraphs/*.symbols.json
+
+# Swift package resolution (optional to commit; ignore for test fixture)
+Package.resolved
+
+# macOS noise
+.DS_Store
+
+# Editor/IDE
+.vscode/
+.idea/
+
+# Deprecated Xcode project generation artifacts
+*.xcodeproj/
+*.xcworkspace/
diff --git a/metadata-generator/TestFixtures/SwiftDemo/Interop/SwiftDemo+NativeScript.swift b/metadata-generator/TestFixtures/SwiftDemo/Interop/SwiftDemo+NativeScript.swift
new file mode 100644
index 000000000..6a94315e5
--- /dev/null
+++ b/metadata-generator/TestFixtures/SwiftDemo/Interop/SwiftDemo+NativeScript.swift
@@ -0,0 +1,712 @@
+// Generated by objc-metadata-generator from the SwiftDemo symbol graphs. Do not edit.
+// NativeScript Swift interop thunks, ABI 1: see NativeScript/runtime/SwiftInterop.h.
+import Foundation
+import SwiftDemo
+
+private typealias __NSThunk = @convention(c) (UnsafeMutableRawPointer, UnsafeRawPointer?, Int) -> Void
+private typealias __NSRelease = @convention(c) (UnsafeMutableRawPointer) -> Void
+
+private final class __NSBox {
+ var value: Value
+ init(_ value: Value) { self.value = value }
+}
+
+// Reads arguments (24-byte slots) and reports results through the runtime's
+// API table, whose address is the first word of the call context.
+private struct __NSCall {
+ let call: UnsafeMutableRawPointer
+ let args: UnsafeRawPointer?
+
+ private func slot(_ index: Int, _: Function.Type) -> Function {
+ call.load(as: UnsafeRawPointer.self).load(fromByteOffset: index * 8, as: Function.self)
+ }
+
+ func isNull(_ i: Int) -> Bool { args!.load(fromByteOffset: i * 24, as: UInt32.self) == 0 }
+ func bool(_ i: Int) -> Bool { args!.load(fromByteOffset: i * 24 + 8, as: UInt8.self) != 0 }
+ func int64(_ i: Int) -> Int64 { args!.load(fromByteOffset: i * 24 + 8, as: Int64.self) }
+ func uint64(_ i: Int) -> UInt64 { args!.load(fromByteOffset: i * 24 + 8, as: UInt64.self) }
+ func double(_ i: Int) -> Double { args!.load(fromByteOffset: i * 24 + 8, as: Double.self) }
+ func string(_ i: Int) -> String {
+ let base = args!.load(fromByteOffset: i * 24 + 8, as: UnsafePointer?.self)
+ let length = Int(args!.load(fromByteOffset: i * 24 + 16, as: UInt64.self))
+ return String(decoding: UnsafeBufferPointer(start: base, count: length), as: UTF8.self)
+ }
+ func object(_ i: Int) -> AnyObject {
+ let pointer = args!.load(fromByteOffset: i * 24 + 8, as: UnsafeMutableRawPointer.self)
+ return Unmanaged.fromOpaque(pointer).takeUnretainedValue()
+ }
+
+ func returnVoid() {
+ slot(0, (@convention(c) (UnsafeMutableRawPointer) -> Void).self)(call)
+ }
+ func returnBool(_ value: Bool) {
+ slot(1, (@convention(c) (UnsafeMutableRawPointer, UInt8) -> Void).self)(call, value ? 1 : 0)
+ }
+ func returnInt64(_ value: Int64) {
+ slot(2, (@convention(c) (UnsafeMutableRawPointer, Int64) -> Void).self)(call, value)
+ }
+ func returnUInt64(_ value: UInt64) {
+ slot(3, (@convention(c) (UnsafeMutableRawPointer, UInt64) -> Void).self)(call, value)
+ }
+ func returnDouble(_ value: Double) {
+ slot(4, (@convention(c) (UnsafeMutableRawPointer, Double) -> Void).self)(call, value)
+ }
+ func returnString(_ value: String) {
+ var value = value
+ value.withUTF8 {
+ slot(5, (@convention(c) (UnsafeMutableRawPointer, UnsafePointer?, Int) -> Void).self)(
+ call, $0.baseAddress, $0.count)
+ }
+ }
+ func returnNull() {
+ slot(6, (@convention(c) (UnsafeMutableRawPointer) -> Void).self)(call)
+ }
+ func returnObject(_ object: AnyObject, _ typeIndex: UInt32) {
+ slot(7, (@convention(c) (UnsafeMutableRawPointer, UnsafeMutableRawPointer, UInt32) -> Void).self)(
+ call, Unmanaged.passRetained(object).toOpaque(), typeIndex)
+ }
+ func throwError(_ error: any Error) {
+ report(String(describing: error), String(reflecting: type(of: error)))
+ }
+ func throwMessage(_ message: String) {
+ report(message, "")
+ }
+ func throwTypeError(_ message: String) {
+ var message = message
+ message.withUTF8 {
+ slot(9, (@convention(c) (UnsafeMutableRawPointer, UnsafePointer?, Int) -> Void).self)(
+ call, $0.baseAddress, $0.count)
+ }
+ }
+ private func report(_ message: String, _ type: String) {
+ var message = message
+ var type = type
+ message.withUTF8 { messageBytes in
+ type.withUTF8 { typeBytes in
+ slot(8, (@convention(c) (UnsafeMutableRawPointer, UnsafePointer?, Int,
+ UnsafePointer?, Int) -> Void).self)(
+ call, messageBytes.baseAddress, messageBytes.count, typeBytes.baseAddress, typeBytes.count)
+ }
+ }
+ }
+}
+
+private func __nsRelease(_ object: UnsafeMutableRawPointer) {
+ Unmanaged.fromOpaque(object).release()
+}
+
+private func __nsEnum1(_ name: String) -> SwiftDemo.Precipitation? {
+ switch name {
+ case "rain": return SwiftDemo.Precipitation.`rain`
+ case "snow": return SwiftDemo.Precipitation.`snow`
+ case "none": return SwiftDemo.Precipitation.`none`
+ default: return nil
+ }
+}
+
+private func __nsEnumName1(_ value: SwiftDemo.Precipitation) -> String {
+ switch value {
+ case SwiftDemo.Precipitation.`rain`: return "rain"
+ case SwiftDemo.Precipitation.`snow`: return "snow"
+ case SwiftDemo.Precipitation.`none`: return "none"
+ @unknown default: return String(describing: value)
+ }
+}
+
+private func __nsEnum5(_ name: String) -> SwiftDemo.Flavor? {
+ switch name {
+ case "vanilla": return SwiftDemo.Flavor.`vanilla`
+ case "chocolate": return SwiftDemo.Flavor.`chocolate`
+ default: return nil
+ }
+}
+
+private func __nsEnumName5(_ value: SwiftDemo.Flavor) -> String {
+ switch value {
+ case SwiftDemo.Flavor.`vanilla`: return "vanilla"
+ case SwiftDemo.Flavor.`chocolate`: return "chocolate"
+ @unknown default: return String(describing: value)
+ }
+}
+
+private func __nsTypeIndex(_ object: AnyObject, _ declared: UInt32) -> UInt32 {
+ if object is SwiftDemo.Square { return 7 }
+ return declared
+}
+
+// s:9SwiftDemo0B0C5greet4name5timesS2S_SitF
+private func __nsThunk0(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Demo else { return rt.throwTypeError("receiver must be SwiftDemo.Demo") }
+ let a0 = rt.string(1)
+ let a1 = Int(truncatingIfNeeded: rt.int64(2))
+ let result: String = receiver.`greet`(name: a0, times: a1)
+ rt.returnString(result)
+}
+
+// s:9SwiftDemo0B0C5greet4nameS2S_tF
+private func __nsThunk1(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Demo else { return rt.throwTypeError("receiver must be SwiftDemo.Demo") }
+ let a0 = rt.string(1)
+ let result: String = receiver.`greet`(name: a0)
+ rt.returnString(result)
+}
+
+// s:9SwiftDemo0B0C7versionSSvpZ
+private func __nsThunk2(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: String = SwiftDemo.Demo.`version`
+ rt.returnString(result)
+}
+
+// s:9SwiftDemo0B0CACycfc
+private func __nsThunk3(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: SwiftDemo.Demo = SwiftDemo.Demo()
+ rt.returnObject(result, __nsTypeIndex(result, 0))
+}
+
+// s:9SwiftDemo10echoUInt64ys0D0VADF
+private func __nsThunk4(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let a0 = rt.uint64(0)
+ let result: UInt64 = SwiftDemo.`echoUInt64`(a0)
+ rt.returnUInt64(UInt64(result))
+}
+
+// s:9SwiftDemo10largestIntSiyF
+private func __nsThunk5(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: Int = SwiftDemo.`largestInt`()
+ rt.returnInt64(Int64(result))
+}
+
+// s:9SwiftDemo11checkedSideyS2dKF
+private func __nsThunk6(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let a0 = rt.double(0)
+ do {
+ let result: Double = try SwiftDemo.`checkedSide`(a0)
+ rt.returnDouble(Double(result))
+ } catch {
+ rt.throwError(error)
+ }
+}
+
+// s:9SwiftDemo13PrecipitationO8rawValueACSgSS_tcfc
+private func __nsThunk7(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let a0 = rt.string(0)
+ let result: SwiftDemo.Precipitation? = SwiftDemo.Precipitation(rawValue: a0)
+ if let result {
+ rt.returnString(__nsEnumName1(result))
+ } else {
+ rt.returnNull()
+ }
+}
+
+// s:9SwiftDemo13defaultFlavorAA0D0Ovp
+private func __nsThunk8(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: SwiftDemo.Flavor = SwiftDemo.`defaultFlavor`
+ rt.returnString(__nsEnumName5(result))
+}
+
+// s:9SwiftDemo13globalCounterSivp
+private func __nsThunk9(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: Int = SwiftDemo.`globalCounter`
+ rt.returnInt64(Int64(result))
+}
+
+// s:9SwiftDemo13globalCounterSivp (setter)
+private func __nsThunk10(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let newValue = Int(truncatingIfNeeded: rt.int64(0))
+ SwiftDemo.`globalCounter` = newValue
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo16makeDefaultPointAA0E0VyF
+private func __nsThunk11(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: SwiftDemo.Point = SwiftDemo.`makeDefaultPoint`()
+ rt.returnObject(__NSBox(result), 3)
+}
+
+// s:9SwiftDemo4RingV5inner5outerAcA5PointV_AGtcfc
+private func __nsThunk12(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let a0 = (rt.object(0) as? __NSBox)?.value else { return rt.throwTypeError("argument 1 must be SwiftDemo.Point") }
+ guard let a1 = (rt.object(1) as? __NSBox)?.value else { return rt.throwTypeError("argument 2 must be SwiftDemo.Point") }
+ let result: SwiftDemo.Ring = SwiftDemo.Ring(inner: a0, outer: a1)
+ rt.returnObject(__NSBox(result), 2)
+}
+
+// s:9SwiftDemo4RingV5innerAA5PointVvp
+private func __nsThunk13(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let box = rt.object(0) as? __NSBox else { return rt.throwTypeError("receiver must be SwiftDemo.Ring") }
+ let result: SwiftDemo.Point = box.value.`inner`
+ rt.returnObject(__NSBox(result), 3)
+}
+
+// s:9SwiftDemo4RingV5innerAA5PointVvp (setter)
+private func __nsThunk14(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let box = rt.object(0) as? __NSBox else { return rt.throwTypeError("receiver must be SwiftDemo.Ring") }
+ guard let newValue = (rt.object(1) as? __NSBox)?.value else { return rt.throwTypeError("value must be SwiftDemo.Point") }
+ box.value.`inner` = newValue
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo4RingV5outerAA5PointVvp
+private func __nsThunk15(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let box = rt.object(0) as? __NSBox else { return rt.throwTypeError("receiver must be SwiftDemo.Ring") }
+ let result: SwiftDemo.Point = box.value.`outer`
+ rt.returnObject(__NSBox(result), 3)
+}
+
+// s:9SwiftDemo4RingV5outerAA5PointVvp (setter)
+private func __nsThunk16(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let box = rt.object(0) as? __NSBox else { return rt.throwTypeError("receiver must be SwiftDemo.Ring") }
+ guard let newValue = (rt.object(1) as? __NSBox)?.value else { return rt.throwTypeError("value must be SwiftDemo.Point") }
+ box.value.`outer` = newValue
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo4RingV6expand2byySd_tF
+private func __nsThunk17(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let box = rt.object(0) as? __NSBox else { return rt.throwTypeError("receiver must be SwiftDemo.Ring") }
+ let a0 = rt.double(1)
+ let _: Void = box.value.`expand`(by: a0)
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo5PointV11descriptionSSvp
+private func __nsThunk18(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let box = rt.object(0) as? __NSBox else { return rt.throwTypeError("receiver must be SwiftDemo.Point") }
+ let result: String = box.value.`description`
+ rt.returnString(result)
+}
+
+// s:9SwiftDemo5PointV1x1yACSd_Sdtcfc
+private func __nsThunk19(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let a0 = rt.double(0)
+ let a1 = rt.double(1)
+ let result: SwiftDemo.Point = SwiftDemo.Point(x: a0, y: a1)
+ rt.returnObject(__NSBox(result), 3)
+}
+
+// s:9SwiftDemo5PointV1xSdvp
+private func __nsThunk20(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let box = rt.object(0) as? __NSBox else { return rt.throwTypeError("receiver must be SwiftDemo.Point") }
+ let result: Double = box.value.`x`
+ rt.returnDouble(Double(result))
+}
+
+// s:9SwiftDemo5PointV1xSdvp (setter)
+private func __nsThunk21(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let box = rt.object(0) as? __NSBox else { return rt.throwTypeError("receiver must be SwiftDemo.Point") }
+ let newValue = rt.double(1)
+ box.value.`x` = newValue
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo5PointV1ySdvp
+private func __nsThunk22(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let box = rt.object(0) as? __NSBox else { return rt.throwTypeError("receiver must be SwiftDemo.Point") }
+ let result: Double = box.value.`y`
+ rt.returnDouble(Double(result))
+}
+
+// s:9SwiftDemo5PointV1ySdvp (setter)
+private func __nsThunk23(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let box = rt.object(0) as? __NSBox else { return rt.throwTypeError("receiver must be SwiftDemo.Point") }
+ let newValue = rt.double(1)
+ box.value.`y` = newValue
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo5PointV6lengthSdvp
+private func __nsThunk24(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let box = rt.object(0) as? __NSBox else { return rt.throwTypeError("receiver must be SwiftDemo.Point") }
+ let result: Double = box.value.`length`
+ rt.returnDouble(Double(result))
+}
+
+// s:9SwiftDemo5shoutySSSgACF
+private func __nsThunk25(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let a0 = rt.isNull(0) ? nil : rt.string(0)
+ let result: String? = SwiftDemo.`shout`(a0)
+ if let result {
+ rt.returnString(result)
+ } else {
+ rt.returnNull()
+ }
+}
+
+// s:9SwiftDemo6FlavorO11descriptionSSvp
+private func __nsThunk26(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = __nsEnum5(rt.string(0)) else { return rt.throwTypeError("receiver must be SwiftDemo.Flavor") }
+ let result: String = receiver.`description`
+ rt.returnString(result)
+}
+
+// s:9SwiftDemo6FlavorO8rawValueACSgSi_tcfc
+private func __nsThunk27(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let a0 = Int(truncatingIfNeeded: rt.int64(0))
+ let result: SwiftDemo.Flavor? = SwiftDemo.Flavor(rawValue: a0)
+ if let result {
+ rt.returnString(__nsEnumName5(result))
+ } else {
+ rt.returnNull()
+ }
+}
+
+// s:9SwiftDemo6LoaderC10modernOnlyyyF
+private func __nsThunk28(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard #available(iOS 16.0, *) else { return rt.throwMessage("modernOnly() requires iOS 16.0") }
+ guard let receiver = rt.object(0) as? SwiftDemo.Loader else { return rt.throwTypeError("receiver must be SwiftDemo.Loader") }
+ let _: Void = receiver.`modernOnly`()
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo6LoaderC11legacyFetchyyF
+private func __nsThunk29(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Loader else { return rt.throwTypeError("receiver must be SwiftDemo.Loader") }
+ let _: Void = receiver.`legacyFetch`()
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo6LoaderC8oldFetchyyF
+private func __nsThunk30(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Loader else { return rt.throwTypeError("receiver must be SwiftDemo.Loader") }
+ let _: Void = receiver.`oldFetch`()
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo6LoaderCACycfc
+private func __nsThunk31(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: SwiftDemo.Loader = SwiftDemo.Loader()
+ rt.returnObject(result, __nsTypeIndex(result, 6))
+}
+
+// s:9SwiftDemo6SquareC4areaSdvp
+private func __nsThunk32(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Square else { return rt.throwTypeError("receiver must be SwiftDemo.Square") }
+ let result: Double = receiver.`area`
+ rt.returnDouble(Double(result))
+}
+
+// s:9SwiftDemo6SquareC4sideACSd_tcfc
+private func __nsThunk33(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let a0 = rt.double(0)
+ let result: SwiftDemo.Square = SwiftDemo.Square(side: a0)
+ rt.returnObject(result, __nsTypeIndex(result, 7))
+}
+
+// s:9SwiftDemo6SquareC4sideSdvp
+private func __nsThunk34(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Square else { return rt.throwTypeError("receiver must be SwiftDemo.Square") }
+ let result: Double = receiver.`side`
+ rt.returnDouble(Double(result))
+}
+
+// s:9SwiftDemo6SquareC4sideSdvp (setter)
+private func __nsThunk35(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Square else { return rt.throwTypeError("receiver must be SwiftDemo.Square") }
+ let newValue = rt.double(1)
+ receiver.`side` = newValue
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo6SquareC5greet4nameS2S_tF
+private func __nsThunk36(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Square else { return rt.throwTypeError("receiver must be SwiftDemo.Square") }
+ let a0 = rt.string(1)
+ let result: String = receiver.`greet`(name: a0)
+ rt.returnString(result)
+}
+
+// s:9SwiftDemo6SquareC5scale2byySd_tF
+private func __nsThunk37(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Square else { return rt.throwTypeError("receiver must be SwiftDemo.Square") }
+ let a0 = rt.double(1)
+ let _: Void = receiver.`scale`(by: a0)
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo6SquareC5sidesSivpZ
+private func __nsThunk38(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: Int = SwiftDemo.Square.`sides`
+ rt.returnInt64(Int64(result))
+}
+
+// s:9SwiftDemo7CounterC5labelSSyF
+private func __nsThunk39(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Counter else { return rt.throwTypeError("receiver must be SwiftDemo.Counter") }
+ let result: String = receiver.`label`()
+ rt.returnString(result)
+}
+
+// s:9SwiftDemo7CounterCACycfc
+private func __nsThunk40(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: SwiftDemo.Counter = SwiftDemo.Counter()
+ rt.returnObject(result, __nsTypeIndex(result, 8))
+}
+
+// s:9SwiftDemo7PolygonC11vertexCountSivp
+private func __nsThunk41(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Polygon else { return rt.throwTypeError("receiver must be SwiftDemo.Polygon") }
+ let result: Int = receiver.`vertexCount`
+ rt.returnInt64(Int64(result))
+}
+
+// s:9SwiftDemo7PolygonC4makeACyFZ
+private func __nsThunk42(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: SwiftDemo.Polygon = SwiftDemo.Polygon.`make`()
+ rt.returnObject(result, __nsTypeIndex(result, 9))
+}
+
+// s:9SwiftDemo7PolygonC4name11vertexCountACSS_Sitcfc
+private func __nsThunk43(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let a0 = rt.string(0)
+ let a1 = Int(truncatingIfNeeded: rt.int64(1))
+ let result: SwiftDemo.Polygon = SwiftDemo.Polygon(name: a0, vertexCount: a1)
+ rt.returnObject(result, __nsTypeIndex(result, 9))
+}
+
+// s:9SwiftDemo7PolygonC4nameACSgSS_tcfc
+private func __nsThunk44(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let a0 = rt.string(0)
+ let result: SwiftDemo.Polygon? = SwiftDemo.Polygon(name: a0)
+ if let result {
+ rt.returnObject(result, __nsTypeIndex(result, 9))
+ } else {
+ rt.returnNull()
+ }
+}
+
+// s:9SwiftDemo7PolygonC4nameSSvp
+private func __nsThunk45(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Polygon else { return rt.throwTypeError("receiver must be SwiftDemo.Polygon") }
+ let result: String = receiver.`name`
+ rt.returnString(result)
+}
+
+// s:9SwiftDemo7PolygonC5scale1x1yySd_SdtF
+private func __nsThunk46(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Polygon else { return rt.throwTypeError("receiver must be SwiftDemo.Polygon") }
+ let a0 = rt.double(1)
+ let a1 = rt.double(2)
+ let _: Void = receiver.`scale`(x: a0, y: a1)
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo7PolygonC5scale2byySd_tF
+private func __nsThunk47(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Polygon else { return rt.throwTypeError("receiver must be SwiftDemo.Polygon") }
+ let a0 = rt.double(1)
+ let _: Void = receiver.`scale`(by: a0)
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo7PolygonC5scale2byySi_tF
+private func __nsThunk48(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Polygon else { return rt.throwTypeError("receiver must be SwiftDemo.Polygon") }
+ let a0 = Int(truncatingIfNeeded: rt.int64(1))
+ let _: Void = receiver.`scale`(by: a0)
+ rt.returnVoid()
+}
+
+// s:9SwiftDemo7PolygonC6sharedACvpZ
+private func __nsThunk49(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: SwiftDemo.Polygon = SwiftDemo.Polygon.`shared`
+ rt.returnObject(result, __nsTypeIndex(result, 9))
+}
+
+// s:9SwiftDemo7PolygonC8describeySSACSgFZ
+private func __nsThunk50(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ var a0: SwiftDemo.Polygon? = nil
+ if !rt.isNull(0) {
+ guard let value = rt.object(0) as? SwiftDemo.Polygon else { return rt.throwTypeError("argument 1 must be SwiftDemo.Polygon") }
+ a0 = value
+ }
+ let result: String = SwiftDemo.Polygon.`describe`(a0)
+ rt.returnString(result)
+}
+
+// s:9SwiftDemo7TrackerC2idACSi_tcfc
+private func __nsThunk51(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let a0 = Int(truncatingIfNeeded: rt.int64(0))
+ let result: SwiftDemo.Tracker = SwiftDemo.Tracker(id: a0)
+ rt.returnObject(result, __nsTypeIndex(result, 10))
+}
+
+// s:9SwiftDemo7TrackerC2idSivp
+private func __nsThunk52(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Tracker else { return rt.throwTypeError("receiver must be SwiftDemo.Tracker") }
+ let result: Int = receiver.`id`
+ rt.returnInt64(Int64(result))
+}
+
+// s:9SwiftDemo7TrackerC4sameACyF
+private func __nsThunk53(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = rt.object(0) as? SwiftDemo.Tracker else { return rt.throwTypeError("receiver must be SwiftDemo.Tracker") }
+ let result: SwiftDemo.Tracker = receiver.`same`()
+ rt.returnObject(result, __nsTypeIndex(result, 10))
+}
+
+// s:9SwiftDemo7TrackerC9liveCountSivpZ
+private func __nsThunk54(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let result: Int = SwiftDemo.Tracker.`liveCount`
+ rt.returnInt64(Int64(result))
+}
+
+// s:9SwiftDemo8echoInt8ys0D0VADF
+private func __nsThunk55(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ let a0 = Int8(truncatingIfNeeded: rt.int64(0))
+ let result: Int8 = SwiftDemo.`echoInt8`(a0)
+ rt.returnInt64(Int64(result))
+}
+
+// s:SYsSHRzSH8RawValueSYRpzrlE04hashB0Sivp::SYNTHESIZED::s:9SwiftDemo13PrecipitationO
+private func __nsThunk56(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = __nsEnum1(rt.string(0)) else { return rt.throwTypeError("receiver must be SwiftDemo.Precipitation") }
+ let result: Int = receiver.`hashValue`
+ rt.returnInt64(Int64(result))
+}
+
+// s:SYsSHRzSH8RawValueSYRpzrlE04hashB0Sivp::SYNTHESIZED::s:9SwiftDemo6FlavorO
+private func __nsThunk57(_ call: UnsafeMutableRawPointer, _ args: UnsafeRawPointer?, _ count: Int) {
+ let rt = __NSCall(call: call, args: args)
+ guard let receiver = __nsEnum5(rt.string(0)) else { return rt.throwTypeError("receiver must be SwiftDemo.Flavor") }
+ let result: Int = receiver.`hashValue`
+ rt.returnInt64(Int64(result))
+}
+
+#if hasAttribute(c)
+@c(ns_swift_register_SwiftDemo)
+#else
+@_cdecl("ns_swift_register_SwiftDemo")
+#endif
+public func __nsRegister_SwiftDemo(_ registrar: UnsafeMutableRawPointer) {
+ let api = registrar.load(as: UnsafeRawPointer.self)
+ let registerModule = api.load(fromByteOffset: 80, as: (@convention(c) (UnsafeMutableRawPointer, UInt32, UnsafePointer, UnsafePointer, __NSRelease) -> Void).self)
+ let registerType = api.load(fromByteOffset: 88, as: (@convention(c) (UnsafeMutableRawPointer, UInt32, UInt32, UnsafePointer, UnsafePointer, Int32) -> Void).self)
+ let registerMember = api.load(fromByteOffset: 96, as: (@convention(c) (UnsafeMutableRawPointer, Int32, UInt32, UInt32, UnsafePointer, UnsafePointer, UnsafePointer, __NSThunk?, __NSThunk?) -> Void).self)
+
+ registerModule(registrar, 1, "SwiftDemo", "619ecd8bdf28f35a", __nsRelease)
+ registerType(registrar, 0, 0, "Demo", "SwiftDemo.Demo", -1)
+ registerType(registrar, 1, 3, "Precipitation", "SwiftDemo.Precipitation", -1)
+ registerType(registrar, 2, 2, "Ring", "SwiftDemo.Ring", -1)
+ registerType(registrar, 3, 2, "Point", "SwiftDemo.Point", -1)
+ registerType(registrar, 4, 0, "Canvas", "SwiftDemo.Canvas", -1)
+ registerType(registrar, 5, 3, "Flavor", "SwiftDemo.Flavor", -1)
+ registerType(registrar, 6, 0, "Loader", "SwiftDemo.Loader", -1)
+ registerType(registrar, 7, 0, "Square", "SwiftDemo.Square", 9)
+ registerType(registrar, 8, 1, "Counter", "SwiftDemo.Counter", -1)
+ registerType(registrar, 9, 0, "Polygon", "SwiftDemo.Polygon", -1)
+ registerType(registrar, 10, 0, "Tracker", "SwiftDemo.Tracker", -1)
+ registerMember(registrar, 0, 1, 0, "greet", "greet(name:times:)", "s,i64>s", __nsThunk0, nil)
+ registerMember(registrar, 0, 1, 0, "greet", "greet(name:)", "s>s", __nsThunk1, nil)
+ registerMember(registrar, 0, 4, 0, "version", "version", ">s", __nsThunk2, nil)
+ registerMember(registrar, 0, 0, 0, "constructor", "init()", ">o0", __nsThunk3, nil)
+ registerMember(registrar, -1, 5, 0, "echoUInt64", "echoUInt64(_:)", "u64>u64", __nsThunk4, nil)
+ registerMember(registrar, -1, 5, 0, "largestInt", "largestInt()", ">i64", __nsThunk5, nil)
+ registerMember(registrar, -1, 5, 1, "checkedSide", "checkedSide(_:)", "f64>f64", __nsThunk6, nil)
+ registerMember(registrar, 1, 7, 0, "none", "none", ">e1", nil, nil)
+ registerMember(registrar, 1, 7, 0, "rain", "rain", ">e1", nil, nil)
+ registerMember(registrar, 1, 7, 0, "snow", "snow", ">e1", nil, nil)
+ registerMember(registrar, 1, 0, 0, "constructor", "init(rawValue:)", "s>e1?", __nsThunk7, nil)
+ registerMember(registrar, -1, 6, 0, "defaultFlavor", "defaultFlavor", ">e5", __nsThunk8, nil)
+ registerMember(registrar, -1, 6, 2, "globalCounter", "globalCounter", ">i64", __nsThunk9, __nsThunk10)
+ registerMember(registrar, -1, 5, 0, "makeDefaultPoint", "makeDefaultPoint()", ">o3", __nsThunk11, nil)
+ registerMember(registrar, 2, 0, 0, "constructor", "init(inner:outer:)", "o3,o3>o2", __nsThunk12, nil)
+ registerMember(registrar, 2, 3, 2, "inner", "inner", ">o3", __nsThunk13, __nsThunk14)
+ registerMember(registrar, 2, 3, 2, "outer", "outer", ">o3", __nsThunk15, __nsThunk16)
+ registerMember(registrar, 2, 1, 0, "expand", "expand(by:)", "f64>v", __nsThunk17, nil)
+ registerMember(registrar, 3, 3, 0, "description", "description", ">s", __nsThunk18, nil)
+ registerMember(registrar, 3, 0, 0, "constructor", "init(x:y:)", "f64,f64>o3", __nsThunk19, nil)
+ registerMember(registrar, 3, 3, 2, "x", "x", ">f64", __nsThunk20, __nsThunk21)
+ registerMember(registrar, 3, 3, 2, "y", "y", ">f64", __nsThunk22, __nsThunk23)
+ registerMember(registrar, 3, 3, 0, "length", "length", ">f64", __nsThunk24, nil)
+ registerMember(registrar, -1, 5, 0, "shout", "shout(_:)", "s?>s?", __nsThunk25, nil)
+ registerMember(registrar, 5, 3, 0, "description", "description", ">s", __nsThunk26, nil)
+ registerMember(registrar, 5, 7, 0, "vanilla", "vanilla", ">e5", nil, nil)
+ registerMember(registrar, 5, 0, 0, "constructor", "init(rawValue:)", "i64>e5?", __nsThunk27, nil)
+ registerMember(registrar, 5, 7, 0, "chocolate", "chocolate", ">e5", nil, nil)
+ registerMember(registrar, 6, 1, 0, "modernOnly", "modernOnly()", ">v", __nsThunk28, nil)
+ registerMember(registrar, 6, 1, 0, "legacyFetch", "legacyFetch()", ">v", __nsThunk29, nil)
+ registerMember(registrar, 6, 1, 0, "oldFetch", "oldFetch()", ">v", __nsThunk30, nil)
+ registerMember(registrar, 6, 0, 0, "constructor", "init()", ">o6", __nsThunk31, nil)
+ registerMember(registrar, 7, 3, 0, "area", "area", ">f64", __nsThunk32, nil)
+ registerMember(registrar, 7, 0, 0, "constructor", "init(side:)", "f64>o7", __nsThunk33, nil)
+ registerMember(registrar, 7, 3, 2, "side", "side", ">f64", __nsThunk34, __nsThunk35)
+ registerMember(registrar, 7, 1, 0, "greet", "greet(name:)", "s>s", __nsThunk36, nil)
+ registerMember(registrar, 7, 1, 0, "scale", "scale(by:)", "f64>v", __nsThunk37, nil)
+ registerMember(registrar, 7, 4, 0, "sides", "sides", ">i64", __nsThunk38, nil)
+ registerMember(registrar, 8, 1, 0, "label", "label()", ">s", __nsThunk39, nil)
+ registerMember(registrar, 8, 0, 0, "constructor", "init()", ">o8", __nsThunk40, nil)
+ registerMember(registrar, 9, 3, 0, "vertexCount", "vertexCount", ">i64", __nsThunk41, nil)
+ registerMember(registrar, 9, 2, 0, "make", "make()", ">o9", __nsThunk42, nil)
+ registerMember(registrar, 9, 0, 0, "constructor", "init(name:vertexCount:)", "s,i64>o9", __nsThunk43, nil)
+ registerMember(registrar, 9, 0, 0, "constructor", "init(name:)", "s>o9?", __nsThunk44, nil)
+ registerMember(registrar, 9, 3, 0, "name", "name", ">s", __nsThunk45, nil)
+ registerMember(registrar, 9, 1, 0, "scale", "scale(x:y:)", "f64,f64>v", __nsThunk46, nil)
+ registerMember(registrar, 9, 1, 4, "scale", "scale(by:)", "f64>v", __nsThunk47, nil)
+ registerMember(registrar, 9, 1, 4, "scale", "scale(by:)", "i64>v", __nsThunk48, nil)
+ registerMember(registrar, 9, 4, 0, "shared", "shared", ">o9", __nsThunk49, nil)
+ registerMember(registrar, 9, 2, 0, "describe", "describe(_:)", "o9?>s", __nsThunk50, nil)
+ registerMember(registrar, 10, 0, 0, "constructor", "init(id:)", "i64>o10", __nsThunk51, nil)
+ registerMember(registrar, 10, 3, 0, "id", "id", ">i64", __nsThunk52, nil)
+ registerMember(registrar, 10, 1, 0, "same", "same()", ">o10", __nsThunk53, nil)
+ registerMember(registrar, 10, 4, 0, "liveCount", "liveCount", ">i64", __nsThunk54, nil)
+ registerMember(registrar, -1, 5, 0, "echoInt8", "echoInt8(_:)", "i8>i8", __nsThunk55, nil)
+ registerMember(registrar, 1, 3, 0, "hashValue", "hashValue", ">i64", __nsThunk56, nil)
+ registerMember(registrar, 5, 3, 0, "hashValue", "hashValue", ">i64", __nsThunk57, nil)
+}
diff --git a/metadata-generator/TestFixtures/SwiftDemo/Package.swift b/metadata-generator/TestFixtures/SwiftDemo/Package.swift
new file mode 100644
index 000000000..6ddba2a1e
--- /dev/null
+++ b/metadata-generator/TestFixtures/SwiftDemo/Package.swift
@@ -0,0 +1,17 @@
+// swift-tools-version: 5.9
+import PackageDescription
+
+let package = Package(
+ name: "SwiftDemo",
+ platforms: [ .iOS(.v15) ],
+ products: [
+ .library(name: "SwiftDemo", targets: ["SwiftDemo"]),
+ // The generated NativeScript thunks, compiled as their own module so
+ // they reach SwiftDemo only through its public interface.
+ .library(name: "SwiftDemoInterop", targets: ["SwiftDemoInterop"]),
+ ],
+ targets: [
+ .target(name: "SwiftDemo", path: "Sources/SwiftDemo"),
+ .target(name: "SwiftDemoInterop", dependencies: ["SwiftDemo"], path: "Interop"),
+ ]
+)
diff --git a/metadata-generator/TestFixtures/SwiftDemo/README.md b/metadata-generator/TestFixtures/SwiftDemo/README.md
new file mode 100644
index 000000000..4ad06c1d9
--- /dev/null
+++ b/metadata-generator/TestFixtures/SwiftDemo/README.md
@@ -0,0 +1,26 @@
+# SwiftDemo fixture
+
+A Swift package whose declarations cover the shapes the Swift symbol graph
+loader must model: classes, structs, enums with raw and associated values,
+protocols, actors, `@MainActor` types, nested types, overloads, operators,
+subscripts, failable initializers, `async`/`throws`, `inout` and escaping
+closure parameters, generics, availability, and extensions of both module and
+standard library types.
+
+`symbolgraphs/` holds the graphs generated from `Sources/`. The loader tests
+read these checked-in files, so they run without a Swift toolchain. After
+changing `Sources/`, regenerate the graphs and then the test snapshots:
+
+```
+./generate-symbolgraphs.sh
+NS_UPDATE_SNAPSHOTS=1 ../../build/bin/swift-symbolgraph-tests
+```
+
+Review the resulting snapshot diff before committing it; it is the record of
+what the loader extracts.
+
+`Interop/SwiftDemo+NativeScript.swift` holds the generated thunks (regenerated
+by the same `NS_UPDATE_SNAPSHOTS=1` run). TestRunner compiles it with the
+fixture sources and exercises it from `TestRunner/app/tests/SwiftInteropTests.js`;
+`Package.swift` builds the same files as two SwiftPM modules (`SwiftDemo` and
+`SwiftDemoInterop`).
diff --git a/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Demo.swift b/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Demo.swift
new file mode 100644
index 000000000..bb55705a4
--- /dev/null
+++ b/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Demo.swift
@@ -0,0 +1,16 @@
+public protocol Greeter {
+ func greet(name: String) -> String
+}
+
+public class Demo: Greeter {
+ public init() {}
+ public func greet(name: String) -> String { "Hello, \(name)" }
+}
+
+public struct Point {
+ public var x: Double
+ public var y: Double
+ public init(x: Double, y: Double) { self.x = x; self.y = y }
+}
+
+public enum Flavor: Int { case vanilla = 0, chocolate = 1 }
diff --git a/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Extensions.swift b/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Extensions.swift
new file mode 100644
index 000000000..6bbc747b1
--- /dev/null
+++ b/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Extensions.swift
@@ -0,0 +1,29 @@
+extension Demo {
+ public func greet(name: String, times: Int) -> String {
+ String(repeating: greet(name: name), count: times)
+ }
+
+ public static var version: String { "1.0" }
+}
+
+extension Point: CustomStringConvertible {
+ public var description: String { "(\(x), \(y))" }
+ public var length: Double { (x * x + y * y).squareRoot() }
+}
+
+extension Flavor: CustomStringConvertible {
+ public var description: String { self == .vanilla ? "vanilla" : "chocolate" }
+}
+
+extension String {
+ public var shouted: String { uppercased() + "!" }
+}
+
+extension Array where Element == Point {
+ public func centroid() -> Point {
+ guard !isEmpty else { return Point(x: 0, y: 0) }
+ let sx = reduce(0) { $0 + $1.x }
+ let sy = reduce(0) { $0 + $1.y }
+ return Point(x: sx / Double(count), y: sy / Double(count))
+ }
+}
diff --git a/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Shapes.swift b/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Shapes.swift
new file mode 100644
index 000000000..0a6f1ec82
--- /dev/null
+++ b/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Shapes.swift
@@ -0,0 +1,142 @@
+import Foundation
+
+public protocol Shape: Greeter {
+ var area: Double { get }
+ static var sides: Int { get }
+}
+
+open class Polygon {
+ public let name: String
+ public private(set) var vertexCount: Int
+ public static let shared = Polygon(name: "shared", vertexCount: 0)
+
+ public init(name: String, vertexCount: Int) {
+ self.name = name
+ self.vertexCount = vertexCount
+ }
+
+ public convenience init?(name: String) {
+ guard !name.isEmpty else { return nil }
+ self.init(name: name, vertexCount: 0)
+ }
+
+ open func scale(by factor: Double) {}
+ open func scale(by factor: Int) {}
+ public func scale(x: Double, y: Double) {}
+
+ public class func make() -> Polygon { Polygon(name: "made", vertexCount: 3) }
+ public static func describe(_ polygon: Polygon?) -> String { polygon?.name ?? "none" }
+
+ public subscript(index: Int) -> Point { Point(x: Double(index), y: 0) }
+
+ internal func hiddenHelper() {}
+}
+
+public final class Square: Polygon, Shape {
+ public var side: Double
+
+ public init(side: Double) {
+ self.side = side
+ super.init(name: "square", vertexCount: 4)
+ }
+
+ public var area: Double { side * side }
+ public static var sides: Int { 4 }
+ public func greet(name: String) -> String { "Square greets \(name)" }
+
+ override public func scale(by factor: Double) { side *= factor }
+}
+
+// A case named `none` must not be confused with Optional.none.
+public enum Precipitation: String {
+ case rain, snow, none
+}
+
+public enum ShapeError: Error {
+ case invalidSide(Double)
+ case tooManySides(count: Int, limit: Int)
+ case unknown
+}
+
+public enum Measurement {
+ case length(Double)
+ case area(width: Double, height: Double)
+ case none
+
+ public struct Unit {
+ public var symbol: String
+ public init(symbol: String) { self.symbol = symbol }
+ }
+
+ public var isNone: Bool {
+ if case .none = self { return true }
+ return false
+ }
+}
+
+public struct Ring {
+ public var inner: Point
+ public var outer: Point
+
+ public init(inner: Point, outer: Point) {
+ self.inner = inner
+ self.outer = outer
+ }
+
+ public mutating func expand(by delta: Double) {
+ outer.x += delta
+ outer.y += delta
+ }
+
+ public static func + (lhs: Ring, rhs: Ring) -> Ring {
+ Ring(inner: lhs.inner, outer: rhs.outer)
+ }
+}
+
+public actor Counter {
+ public private(set) var value: Int = 0
+ public init() {}
+ public func increment() -> Int {
+ value += 1
+ return value
+ }
+ public nonisolated func label() -> String { "counter" }
+}
+
+@MainActor
+public final class Canvas {
+ public init() {}
+ public func draw(_ shape: any Shape) {}
+}
+
+public final class Loader {
+ public init() {}
+
+ public func load(path: String) throws -> Data { Data() }
+ public func fetch(url: URL) async throws -> String { url.absoluteString }
+ public func wait(seconds: Double) async {}
+
+ public func transform(_ shape: T) -> T { shape }
+ public func first(of items: [Element]) -> Element? { items.first }
+
+ public func withCompletion(_ completion: @escaping (Result) -> Void) {}
+ public func each(_ body: (Int) -> Void) {}
+
+ public func lookup(table: [String: Int], key: String) -> Int? { table[key] }
+
+ public func update(_ point: inout Point) { point.x += 1 }
+
+ @available(iOS 16.0, *)
+ public func modernOnly() {}
+
+ @available(*, deprecated, message: "Use fetch(url:) instead")
+ public func legacyFetch() {}
+
+ @available(iOS, introduced: 15.0, deprecated: 17.0, renamed: "fetch(url:)")
+ public func oldFetch() {}
+}
+
+public func makeDefaultPoint() -> Point { Point(x: 0, y: 0) }
+public let defaultFlavor: Flavor = .vanilla
+public var globalCounter: Int = 0
+public typealias Coordinates = (latitude: Double, longitude: Double)
diff --git a/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Values.swift b/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Values.swift
new file mode 100644
index 000000000..4036b478c
--- /dev/null
+++ b/metadata-generator/TestFixtures/SwiftDemo/Sources/SwiftDemo/Values.swift
@@ -0,0 +1,26 @@
+// Declarations the runtime tests use to exercise value marshaling, errors and
+// object lifetime.
+
+public func checkedSide(_ side: Double) throws -> Double {
+ if side < 0 { throw ShapeError.invalidSide(side) }
+ return side
+}
+
+public func echoInt8(_ value: Int8) -> Int8 { value }
+public func echoUInt64(_ value: UInt64) -> UInt64 { value }
+public func largestInt() -> Int { Int.max }
+public func shout(_ name: String?) -> String? { name.map { $0.uppercased() } }
+
+public final class Tracker {
+ public private(set) static var liveCount = 0
+ public let id: Int
+
+ public init(id: Int) {
+ self.id = id
+ Tracker.liveCount += 1
+ }
+
+ deinit { Tracker.liveCount -= 1 }
+
+ public func same() -> Tracker { self }
+}
diff --git a/metadata-generator/TestFixtures/SwiftDemo/generate-symbolgraphs.sh b/metadata-generator/TestFixtures/SwiftDemo/generate-symbolgraphs.sh
new file mode 100755
index 000000000..d62314f8c
--- /dev/null
+++ b/metadata-generator/TestFixtures/SwiftDemo/generate-symbolgraphs.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+# Regenerates the checked-in symbol graphs under symbolgraphs/.
+# The parser tests snapshot these files, so regenerate only when the fixture
+# sources change or when deliberately adopting a new toolchain's output.
+set -euo pipefail
+
+FIXTURE_DIR="$(cd "$(dirname "$0")" && pwd)"
+OUT_DIR="$FIXTURE_DIR/symbolgraphs"
+WORK_DIR="$(mktemp -d)"
+trap 'rm -rf "$WORK_DIR"' EXIT
+
+SDK_PATH="$(xcrun --sdk iphonesimulator --show-sdk-path)"
+
+xcrun swiftc \
+ -emit-module \
+ -emit-module-path "$WORK_DIR/SwiftDemo.swiftmodule" \
+ -emit-symbol-graph \
+ -emit-symbol-graph-dir "$WORK_DIR" \
+ -symbol-graph-minimum-access-level public \
+ -module-name SwiftDemo \
+ -target arm64-apple-ios15.0-simulator \
+ -sdk "$SDK_PATH" \
+ "$FIXTURE_DIR"/Sources/SwiftDemo/*.swift
+
+rm -rf "$OUT_DIR"
+mkdir -p "$OUT_DIR"
+cp "$WORK_DIR"/*.symbols.json "$OUT_DIR/"
+
+# Absolute source paths differ per machine; keep the fixture reproducible.
+sed -i '' "s#file://$FIXTURE_DIR/#file://#g" "$OUT_DIR"/*.symbols.json
+
+ls -1 "$OUT_DIR"
diff --git a/metadata-generator/TestFixtures/SwiftDemo/symbolgraphs/SwiftDemo.symbols.json b/metadata-generator/TestFixtures/SwiftDemo/symbolgraphs/SwiftDemo.symbols.json
new file mode 100644
index 000000000..141d999da
--- /dev/null
+++ b/metadata-generator/TestFixtures/SwiftDemo/symbolgraphs/SwiftDemo.symbols.json
@@ -0,0 +1 @@
+{"metadata":{"formatVersion":{"major":0,"minor":6,"patch":0},"generator":"Apple Swift version 6.4 (swiftlang-6.4.0.34.1 clang-2100.3.34.1)"},"module":{"name":"SwiftDemo","platform":{"architecture":"arm64","environment":"simulator","vendor":"apple","operatingSystem":{"name":"ios","minimumVersion":{"major":15,"minor":0}}}},"symbols":[{"kind":{"identifier":"swift.protocol","displayName":"Protocol"},"identifier":{"precise":"s:9SwiftDemo7GreeterP","interfaceLanguage":"swift"},"pathComponents":["Greeter"],"names":{"title":"Greeter","navigator":[{"kind":"identifier","spelling":"Greeter"}],"subHeading":[{"kind":"keyword","spelling":"protocol"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Greeter"}]},"declarationFragments":[{"kind":"keyword","spelling":"protocol"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Greeter"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":0,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo7GreeterP5greet4nameS2S_tF","interfaceLanguage":"swift"},"pathComponents":["Greeter","greet(name:)"],"names":{"title":"greet(name:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"greet"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"functionSignature":{"parameters":[{"name":"name","declarationFragments":[{"kind":"identifier","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]}],"returns":[{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"greet"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":1,"character":9}}},{"kind":{"identifier":"swift.class","displayName":"Class"},"identifier":{"precise":"s:9SwiftDemo0B0C","interfaceLanguage":"swift"},"pathComponents":["Demo"],"names":{"title":"Demo","navigator":[{"kind":"identifier","spelling":"Demo"}],"subHeading":[{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Demo"}]},"declarationFragments":[{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Demo"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":4,"character":13}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo0B0CACycfc","interfaceLanguage":"swift"},"pathComponents":["Demo","init()"],"names":{"title":"init()","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"()"}]},"functionSignature":{},"declarationFragments":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"()"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":5,"character":11}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo0B0C5greet4nameS2S_tF","interfaceLanguage":"swift"},"pathComponents":["Demo","greet(name:)"],"names":{"title":"greet(name:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"greet"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"functionSignature":{"parameters":[{"name":"name","declarationFragments":[{"kind":"identifier","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]}],"returns":[{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"greet"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":6,"character":16}}},{"kind":{"identifier":"swift.struct","displayName":"Structure"},"identifier":{"precise":"s:9SwiftDemo5PointV","interfaceLanguage":"swift"},"pathComponents":["Point"],"names":{"title":"Point","navigator":[{"kind":"identifier","spelling":"Point"}],"subHeading":[{"kind":"keyword","spelling":"struct"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Point"}]},"declarationFragments":[{"kind":"keyword","spelling":"struct"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Point"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":9,"character":14}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo5PointV1xSdvp","interfaceLanguage":"swift"},"pathComponents":["Point","x"],"names":{"title":"x","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"x"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"x"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":10,"character":15}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo5PointV1ySdvp","interfaceLanguage":"swift"},"pathComponents":["Point","y"],"names":{"title":"y","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"y"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"y"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":11,"character":15}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo5PointV1x1yACSd_Sdtcfc","interfaceLanguage":"swift"},"pathComponents":["Point","init(x:y:)"],"names":{"title":"init(x:y:)","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"x"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"y"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"x","declarationFragments":[{"kind":"identifier","spelling":"x"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]},{"name":"y","declarationFragments":[{"kind":"identifier","spelling":"y"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]}]},"declarationFragments":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"x"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"y"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":12,"character":11}}},{"kind":{"identifier":"swift.enum","displayName":"Enumeration"},"identifier":{"precise":"s:9SwiftDemo6FlavorO","interfaceLanguage":"swift"},"pathComponents":["Flavor"],"names":{"title":"Flavor","navigator":[{"kind":"identifier","spelling":"Flavor"}],"subHeading":[{"kind":"keyword","spelling":"enum"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Flavor"}]},"declarationFragments":[{"kind":"keyword","spelling":"enum"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Flavor"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":15,"character":12}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:SYsSHRzSH8RawValueSYRpzrlE04hashB0Sivp::SYNTHESIZED::s:9SwiftDemo6FlavorO","interfaceLanguage":"swift"},"pathComponents":["Flavor","hashValue"],"names":{"title":"hashValue","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"hashValue"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"swiftExtension":{"extendedModule":"Swift","typeKind":"swift.protocol","constraints":[{"kind":"conformance","lhs":"Self","rhs":"Hashable","rhsPrecise":"s:SH"},{"kind":"conformance","lhs":"Self.RawValue","rhs":"Hashable","rhsPrecise":"s:SH"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"hashValue"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public"},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:SYsSHRzSH8RawValueSYRpzrlE4hash4intoys6HasherVz_tF::SYNTHESIZED::s:9SwiftDemo6FlavorO","interfaceLanguage":"swift"},"pathComponents":["Flavor","hash(into:)"],"names":{"title":"hash(into:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"hash"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"into"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"inout"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Hasher","preciseIdentifier":"s:s6HasherV"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"into","internalName":"hasher","declarationFragments":[{"kind":"identifier","spelling":"hasher"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Hasher","preciseIdentifier":"s:s6HasherV"}]}],"returns":[{"kind":"text","spelling":"()"}]},"swiftGenerics":{"constraints":[{"kind":"conformance","lhs":"Self","rhs":"Hashable","rhsPrecise":"s:SH"},{"kind":"conformance","lhs":"Self.RawValue","rhs":"Hashable","rhsPrecise":"s:SH"}]},"swiftExtension":{"extendedModule":"Swift","typeKind":"swift.protocol","constraints":[{"kind":"conformance","lhs":"Self","rhs":"Hashable","rhsPrecise":"s:SH"},{"kind":"conformance","lhs":"Self.RawValue","rhs":"Hashable","rhsPrecise":"s:SH"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"hash"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"into"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"hasher"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"inout"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Hasher","preciseIdentifier":"s:s6HasherV"},{"kind":"text","spelling":")"}],"accessLevel":"public"},{"kind":{"identifier":"swift.func.op","displayName":"Operator"},"identifier":{"precise":"s:SQsRi_zRi0_zrlE2neoiySbx_xtFZ::SYNTHESIZED::s:9SwiftDemo6FlavorO","interfaceLanguage":"swift"},"pathComponents":["Flavor","!=(_:_:)"],"names":{"title":"!=(_:_:)","subHeading":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"!="},{"kind":"text","spelling":" "},{"kind":"text","spelling":"("},{"kind":"keyword","spelling":"borrowing"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Self"},{"kind":"text","spelling":", "},{"kind":"keyword","spelling":"borrowing"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Self"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Bool","preciseIdentifier":"s:Sb"}]},"docComment":{"module":"Swift","lines":[{"text":"Returns a Boolean value indicating whether two values are not equal."},{"text":""},{"text":"Inequality is the inverse of equality. For any values `a` and `b`, `a != b`"},{"text":"implies that `a == b` is `false`."},{"text":""},{"text":"This is the default implementation of the not-equal-to operator (`!=`)"},{"text":"for any type that conforms to `Equatable`."},{"text":""},{"text":"- Parameters:"},{"text":" - lhs: A value to compare."},{"text":" - rhs: Another value to compare."}]},"functionSignature":{"parameters":[{"name":"lhs","declarationFragments":[{"kind":"identifier","spelling":"lhs"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Self"}]},{"name":"rhs","declarationFragments":[{"kind":"identifier","spelling":"rhs"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Self"}]}],"returns":[{"kind":"typeIdentifier","spelling":"Bool","preciseIdentifier":"s:Sb"}]},"swiftExtension":{"extendedModule":"Swift","typeKind":"swift.protocol"},"declarationFragments":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"!="},{"kind":"text","spelling":" "},{"kind":"text","spelling":"("},{"kind":"internalParam","spelling":"lhs"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"borrowing"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Self"},{"kind":"text","spelling":", "},{"kind":"internalParam","spelling":"rhs"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"borrowing"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Self"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Bool","preciseIdentifier":"s:Sb"}],"accessLevel":"public"},{"kind":{"identifier":"swift.enum.case","displayName":"Case"},"identifier":{"precise":"s:9SwiftDemo6FlavorO7vanillayA2CmF","interfaceLanguage":"swift"},"pathComponents":["Flavor","vanilla"],"names":{"title":"Flavor.vanilla","subHeading":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"vanilla"}]},"declarationFragments":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"vanilla"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":15,"character":31}}},{"kind":{"identifier":"swift.enum.case","displayName":"Case"},"identifier":{"precise":"s:9SwiftDemo6FlavorO9chocolateyA2CmF","interfaceLanguage":"swift"},"pathComponents":["Flavor","chocolate"],"names":{"title":"Flavor.chocolate","subHeading":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"chocolate"}]},"declarationFragments":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"chocolate"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Demo.swift","position":{"line":15,"character":44}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo6FlavorO8rawValueACSgSi_tcfc","interfaceLanguage":"swift"},"pathComponents":["Flavor","init(rawValue:)"],"names":{"title":"init(rawValue:)","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"?("},{"kind":"externalParam","spelling":"rawValue"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"rawValue","declarationFragments":[{"kind":"identifier","spelling":"rawValue"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]}]},"declarationFragments":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"?("},{"kind":"externalParam","spelling":"rawValue"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":")"}],"accessLevel":"public"},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo0B0C5greet4name5timesS2S_SitF","interfaceLanguage":"swift"},"pathComponents":["Demo","greet(name:times:)"],"names":{"title":"greet(name:times:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"greet"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"times"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"functionSignature":{"parameters":[{"name":"name","declarationFragments":[{"kind":"identifier","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},{"name":"times","declarationFragments":[{"kind":"identifier","spelling":"times"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]}],"returns":[{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"swiftExtension":{"extendedModule":"SwiftDemo","typeKind":"swift.class"},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"greet"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"times"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Extensions.swift","position":{"line":1,"character":16}}},{"kind":{"identifier":"swift.type.property","displayName":"Type Property"},"identifier":{"precise":"s:9SwiftDemo0B0C7versionSSvpZ","interfaceLanguage":"swift"},"pathComponents":["Demo","version"],"names":{"title":"version","subHeading":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"version"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"swiftExtension":{"extendedModule":"SwiftDemo","typeKind":"swift.class"},"declarationFragments":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"version"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Extensions.swift","position":{"line":5,"character":22}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo5PointV11descriptionSSvp","interfaceLanguage":"swift"},"pathComponents":["Point","description"],"names":{"title":"description","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"description"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"swiftExtension":{"extendedModule":"SwiftDemo","typeKind":"swift.struct"},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"description"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Extensions.swift","position":{"line":9,"character":15}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo5PointV6lengthSdvp","interfaceLanguage":"swift"},"pathComponents":["Point","length"],"names":{"title":"length","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"length"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]},"swiftExtension":{"extendedModule":"SwiftDemo","typeKind":"swift.struct"},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"length"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Extensions.swift","position":{"line":10,"character":15}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo6FlavorO11descriptionSSvp","interfaceLanguage":"swift"},"pathComponents":["Flavor","description"],"names":{"title":"description","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"description"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"swiftExtension":{"extendedModule":"SwiftDemo","typeKind":"swift.enum"},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"description"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Extensions.swift","position":{"line":14,"character":15}}},{"kind":{"identifier":"swift.protocol","displayName":"Protocol"},"identifier":{"precise":"s:9SwiftDemo5ShapeP","interfaceLanguage":"swift"},"pathComponents":["Shape"],"names":{"title":"Shape","navigator":[{"kind":"identifier","spelling":"Shape"}],"subHeading":[{"kind":"keyword","spelling":"protocol"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Shape"}]},"declarationFragments":[{"kind":"keyword","spelling":"protocol"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Shape"},{"kind":"text","spelling":" : "},{"kind":"typeIdentifier","spelling":"Greeter","preciseIdentifier":"s:9SwiftDemo7GreeterP"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":2,"character":16}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo5ShapeP4areaSdvp","interfaceLanguage":"swift"},"pathComponents":["Shape","area"],"names":{"title":"area","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"area"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"area"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":3,"character":8}}},{"kind":{"identifier":"swift.type.property","displayName":"Type Property"},"identifier":{"precise":"s:9SwiftDemo5ShapeP5sidesSivpZ","interfaceLanguage":"swift"},"pathComponents":["Shape","sides"],"names":{"title":"sides","subHeading":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"sides"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"declarationFragments":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"sides"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":4,"character":15}}},{"kind":{"identifier":"swift.class","displayName":"Class"},"identifier":{"precise":"s:9SwiftDemo7PolygonC","interfaceLanguage":"swift"},"pathComponents":["Polygon"],"names":{"title":"Polygon","navigator":[{"kind":"identifier","spelling":"Polygon"}],"subHeading":[{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Polygon"}]},"declarationFragments":[{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Polygon"}],"accessLevel":"open","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":7,"character":11}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo7PolygonC4nameSSvp","interfaceLanguage":"swift"},"pathComponents":["Polygon","name"],"names":{"title":"name","subHeading":[{"kind":"keyword","spelling":"let"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"declarationFragments":[{"kind":"keyword","spelling":"let"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":8,"character":15}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo7PolygonC11vertexCountSivp","interfaceLanguage":"swift"},"pathComponents":["Polygon","vertexCount"],"names":{"title":"vertexCount","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"vertexCount"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"vertexCount"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":" { get }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":9,"character":28}}},{"kind":{"identifier":"swift.type.property","displayName":"Type Property"},"identifier":{"precise":"s:9SwiftDemo7PolygonC6sharedACvpZ","interfaceLanguage":"swift"},"pathComponents":["Polygon","shared"],"names":{"title":"shared","subHeading":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"let"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"shared"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Polygon","preciseIdentifier":"s:9SwiftDemo7PolygonC"}]},"declarationFragments":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"let"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"shared"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Polygon","preciseIdentifier":"s:9SwiftDemo7PolygonC"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":10,"character":22}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo7PolygonC4name11vertexCountACSS_Sitcfc","interfaceLanguage":"swift"},"pathComponents":["Polygon","init(name:vertexCount:)"],"names":{"title":"init(name:vertexCount:)","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"vertexCount"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"name","declarationFragments":[{"kind":"identifier","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},{"name":"vertexCount","declarationFragments":[{"kind":"identifier","spelling":"vertexCount"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]}]},"declarationFragments":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"vertexCount"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":12,"character":11}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo7PolygonC4nameACSgSS_tcfc","interfaceLanguage":"swift"},"pathComponents":["Polygon","init(name:)"],"names":{"title":"init(name:)","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"?("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"name","declarationFragments":[{"kind":"identifier","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]}]},"declarationFragments":[{"kind":"keyword","spelling":"convenience"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"?("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":17,"character":23}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo7PolygonC5scale2byySd_tF","interfaceLanguage":"swift"},"pathComponents":["Polygon","scale(by:)"],"names":{"title":"scale(by:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"scale"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"by"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"by","internalName":"factor","declarationFragments":[{"kind":"identifier","spelling":"factor"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]}],"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"scale"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"by"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"factor"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}],"accessLevel":"open","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":22,"character":14}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo7PolygonC5scale2byySi_tF","interfaceLanguage":"swift"},"pathComponents":["Polygon","scale(by:)"],"names":{"title":"scale(by:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"scale"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"by"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"by","internalName":"factor","declarationFragments":[{"kind":"identifier","spelling":"factor"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]}],"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"scale"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"by"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"factor"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":")"}],"accessLevel":"open","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":23,"character":14}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo7PolygonC5scale1x1yySd_SdtF","interfaceLanguage":"swift"},"pathComponents":["Polygon","scale(x:y:)"],"names":{"title":"scale(x:y:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"scale"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"x"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"y"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"x","declarationFragments":[{"kind":"identifier","spelling":"x"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]},{"name":"y","declarationFragments":[{"kind":"identifier","spelling":"y"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]}],"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"scale"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"x"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"y"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":24,"character":16}}},{"kind":{"identifier":"swift.type.method","displayName":"Type Method"},"identifier":{"precise":"s:9SwiftDemo7PolygonC4makeACyFZ","interfaceLanguage":"swift"},"pathComponents":["Polygon","make()"],"names":{"title":"make()","subHeading":[{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"make"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Polygon","preciseIdentifier":"s:9SwiftDemo7PolygonC"}]},"functionSignature":{"returns":[{"kind":"typeIdentifier","spelling":"Polygon","preciseIdentifier":"s:9SwiftDemo7PolygonC"}]},"declarationFragments":[{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"make"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Polygon","preciseIdentifier":"s:9SwiftDemo7PolygonC"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":26,"character":22}}},{"kind":{"identifier":"swift.type.method","displayName":"Type Method"},"identifier":{"precise":"s:9SwiftDemo7PolygonC8describeySSACSgFZ","interfaceLanguage":"swift"},"pathComponents":["Polygon","describe(_:)"],"names":{"title":"describe(_:)","subHeading":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"describe"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"Polygon","preciseIdentifier":"s:9SwiftDemo7PolygonC"},{"kind":"text","spelling":"?) -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"functionSignature":{"parameters":[{"name":"polygon","declarationFragments":[{"kind":"identifier","spelling":"polygon"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Polygon","preciseIdentifier":"s:9SwiftDemo7PolygonC"},{"kind":"text","spelling":"?"}]}],"returns":[{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"declarationFragments":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"describe"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"polygon"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Polygon","preciseIdentifier":"s:9SwiftDemo7PolygonC"},{"kind":"text","spelling":"?) -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":27,"character":23}}},{"kind":{"identifier":"swift.subscript","displayName":"Instance Subscript"},"identifier":{"precise":"s:9SwiftDemo7PolygonCyAA5PointVSicip","interfaceLanguage":"swift"},"pathComponents":["Polygon","subscript(_:)"],"names":{"title":"subscript(_:)","subHeading":[{"kind":"keyword","spelling":"subscript"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}]},"functionSignature":{"parameters":[{"name":"index","declarationFragments":[{"kind":"identifier","spelling":"index"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]}],"returns":[{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}]},"declarationFragments":[{"kind":"keyword","spelling":"subscript"},{"kind":"text","spelling":"("},{"kind":"internalParam","spelling":"index"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":29,"character":11}}},{"kind":{"identifier":"swift.class","displayName":"Class"},"identifier":{"precise":"s:9SwiftDemo6SquareC","interfaceLanguage":"swift"},"pathComponents":["Square"],"names":{"title":"Square","navigator":[{"kind":"identifier","spelling":"Square"}],"subHeading":[{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Square"}]},"declarationFragments":[{"kind":"keyword","spelling":"final"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Square"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":34,"character":19}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo6SquareC4sideSdvp","interfaceLanguage":"swift"},"pathComponents":["Square","side"],"names":{"title":"side","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"side"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"side"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":35,"character":15}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo6SquareC4sideACSd_tcfc","interfaceLanguage":"swift"},"pathComponents":["Square","init(side:)"],"names":{"title":"init(side:)","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"side"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"side","declarationFragments":[{"kind":"identifier","spelling":"side"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]}]},"declarationFragments":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"side"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":37,"character":11}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo6SquareC4areaSdvp","interfaceLanguage":"swift"},"pathComponents":["Square","area"],"names":{"title":"area","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"area"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"area"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":42,"character":15}}},{"kind":{"identifier":"swift.type.property","displayName":"Type Property"},"identifier":{"precise":"s:9SwiftDemo6SquareC5sidesSivpZ","interfaceLanguage":"swift"},"pathComponents":["Square","sides"],"names":{"title":"sides","subHeading":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"sides"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"declarationFragments":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"sides"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":43,"character":22}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6SquareC5greet4nameS2S_tF","interfaceLanguage":"swift"},"pathComponents":["Square","greet(name:)"],"names":{"title":"greet(name:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"greet"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"functionSignature":{"parameters":[{"name":"name","declarationFragments":[{"kind":"identifier","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]}],"returns":[{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"greet"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":44,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6SquareC5scale2byySd_tF","interfaceLanguage":"swift"},"pathComponents":["Square","scale(by:)"],"names":{"title":"scale(by:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"scale"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"by"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"by","internalName":"factor","declarationFragments":[{"kind":"identifier","spelling":"factor"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]}],"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"override"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"scale"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"by"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"factor"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":46,"character":25}}},{"kind":{"identifier":"swift.enum","displayName":"Enumeration"},"identifier":{"precise":"s:9SwiftDemo13PrecipitationO","interfaceLanguage":"swift"},"pathComponents":["Precipitation"],"names":{"title":"Precipitation","navigator":[{"kind":"identifier","spelling":"Precipitation"}],"subHeading":[{"kind":"keyword","spelling":"enum"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Precipitation"}]},"declarationFragments":[{"kind":"keyword","spelling":"enum"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Precipitation"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":50,"character":12}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:SYsSHRzSH8RawValueSYRpzrlE04hashB0Sivp::SYNTHESIZED::s:9SwiftDemo13PrecipitationO","interfaceLanguage":"swift"},"pathComponents":["Precipitation","hashValue"],"names":{"title":"hashValue","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"hashValue"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"swiftExtension":{"extendedModule":"Swift","typeKind":"swift.protocol","constraints":[{"kind":"conformance","lhs":"Self","rhs":"Hashable","rhsPrecise":"s:SH"},{"kind":"conformance","lhs":"Self.RawValue","rhs":"Hashable","rhsPrecise":"s:SH"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"hashValue"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public"},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:SYsSHRzSH8RawValueSYRpzrlE4hash4intoys6HasherVz_tF::SYNTHESIZED::s:9SwiftDemo13PrecipitationO","interfaceLanguage":"swift"},"pathComponents":["Precipitation","hash(into:)"],"names":{"title":"hash(into:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"hash"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"into"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"inout"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Hasher","preciseIdentifier":"s:s6HasherV"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"into","internalName":"hasher","declarationFragments":[{"kind":"identifier","spelling":"hasher"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Hasher","preciseIdentifier":"s:s6HasherV"}]}],"returns":[{"kind":"text","spelling":"()"}]},"swiftGenerics":{"constraints":[{"kind":"conformance","lhs":"Self","rhs":"Hashable","rhsPrecise":"s:SH"},{"kind":"conformance","lhs":"Self.RawValue","rhs":"Hashable","rhsPrecise":"s:SH"}]},"swiftExtension":{"extendedModule":"Swift","typeKind":"swift.protocol","constraints":[{"kind":"conformance","lhs":"Self","rhs":"Hashable","rhsPrecise":"s:SH"},{"kind":"conformance","lhs":"Self.RawValue","rhs":"Hashable","rhsPrecise":"s:SH"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"hash"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"into"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"hasher"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"inout"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Hasher","preciseIdentifier":"s:s6HasherV"},{"kind":"text","spelling":")"}],"accessLevel":"public"},{"kind":{"identifier":"swift.func.op","displayName":"Operator"},"identifier":{"precise":"s:SQsRi_zRi0_zrlE2neoiySbx_xtFZ::SYNTHESIZED::s:9SwiftDemo13PrecipitationO","interfaceLanguage":"swift"},"pathComponents":["Precipitation","!=(_:_:)"],"names":{"title":"!=(_:_:)","subHeading":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"!="},{"kind":"text","spelling":" "},{"kind":"text","spelling":"("},{"kind":"keyword","spelling":"borrowing"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Self"},{"kind":"text","spelling":", "},{"kind":"keyword","spelling":"borrowing"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Self"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Bool","preciseIdentifier":"s:Sb"}]},"docComment":{"module":"Swift","lines":[{"text":"Returns a Boolean value indicating whether two values are not equal."},{"text":""},{"text":"Inequality is the inverse of equality. For any values `a` and `b`, `a != b`"},{"text":"implies that `a == b` is `false`."},{"text":""},{"text":"This is the default implementation of the not-equal-to operator (`!=`)"},{"text":"for any type that conforms to `Equatable`."},{"text":""},{"text":"- Parameters:"},{"text":" - lhs: A value to compare."},{"text":" - rhs: Another value to compare."}]},"functionSignature":{"parameters":[{"name":"lhs","declarationFragments":[{"kind":"identifier","spelling":"lhs"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Self"}]},{"name":"rhs","declarationFragments":[{"kind":"identifier","spelling":"rhs"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Self"}]}],"returns":[{"kind":"typeIdentifier","spelling":"Bool","preciseIdentifier":"s:Sb"}]},"swiftExtension":{"extendedModule":"Swift","typeKind":"swift.protocol"},"declarationFragments":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"!="},{"kind":"text","spelling":" "},{"kind":"text","spelling":"("},{"kind":"internalParam","spelling":"lhs"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"borrowing"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Self"},{"kind":"text","spelling":", "},{"kind":"internalParam","spelling":"rhs"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"borrowing"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Self"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Bool","preciseIdentifier":"s:Sb"}],"accessLevel":"public"},{"kind":{"identifier":"swift.enum.case","displayName":"Case"},"identifier":{"precise":"s:9SwiftDemo13PrecipitationO4rainyA2CmF","interfaceLanguage":"swift"},"pathComponents":["Precipitation","rain"],"names":{"title":"Precipitation.rain","subHeading":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"rain"}]},"declarationFragments":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"rain"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":51,"character":9}}},{"kind":{"identifier":"swift.enum.case","displayName":"Case"},"identifier":{"precise":"s:9SwiftDemo13PrecipitationO4snowyA2CmF","interfaceLanguage":"swift"},"pathComponents":["Precipitation","snow"],"names":{"title":"Precipitation.snow","subHeading":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"snow"}]},"declarationFragments":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"snow"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":51,"character":15}}},{"kind":{"identifier":"swift.enum.case","displayName":"Case"},"identifier":{"precise":"s:9SwiftDemo13PrecipitationO4noneyA2CmF","interfaceLanguage":"swift"},"pathComponents":["Precipitation","none"],"names":{"title":"Precipitation.none","subHeading":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"none"}]},"declarationFragments":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"none"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":51,"character":21}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo13PrecipitationO8rawValueACSgSS_tcfc","interfaceLanguage":"swift"},"pathComponents":["Precipitation","init(rawValue:)"],"names":{"title":"init(rawValue:)","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"?("},{"kind":"externalParam","spelling":"rawValue"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"rawValue","declarationFragments":[{"kind":"identifier","spelling":"rawValue"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]}]},"declarationFragments":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"?("},{"kind":"externalParam","spelling":"rawValue"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":")"}],"accessLevel":"public"},{"kind":{"identifier":"swift.enum","displayName":"Enumeration"},"identifier":{"precise":"s:9SwiftDemo10ShapeErrorO","interfaceLanguage":"swift"},"pathComponents":["ShapeError"],"names":{"title":"ShapeError","navigator":[{"kind":"identifier","spelling":"ShapeError"}],"subHeading":[{"kind":"keyword","spelling":"enum"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"ShapeError"}]},"declarationFragments":[{"kind":"keyword","spelling":"enum"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"ShapeError"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":54,"character":12}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:s5ErrorP10FoundationE20localizedDescriptionSSvp::SYNTHESIZED::s:9SwiftDemo10ShapeErrorO","interfaceLanguage":"swift"},"pathComponents":["ShapeError","localizedDescription"],"names":{"title":"localizedDescription","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"localizedDescription"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"docComment":{"module":"Foundation","lines":[{"text":"Retrieve the localized description for this error."}]},"swiftExtension":{"extendedModule":"Swift","typeKind":"swift.protocol"},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"localizedDescription"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","availability":[{"domain":"iOS","introduced":{"major":8,"minor":0}},{"domain":"macOS","introduced":{"major":10,"minor":10}},{"domain":"tvOS","introduced":{"major":9,"minor":0}},{"domain":"watchOS","introduced":{"major":2,"minor":0}}]},{"kind":{"identifier":"swift.enum.case","displayName":"Case"},"identifier":{"precise":"s:9SwiftDemo10ShapeErrorO11invalidSideyACSdcACmF","interfaceLanguage":"swift"},"pathComponents":["ShapeError","invalidSide(_:)"],"names":{"title":"ShapeError.invalidSide(_:)","subHeading":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"invalidSide"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}]},"declarationFragments":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"invalidSide"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":55,"character":9}}},{"kind":{"identifier":"swift.enum.case","displayName":"Case"},"identifier":{"precise":"s:9SwiftDemo10ShapeErrorO12tooManySidesyACSi_SitcACmF","interfaceLanguage":"swift"},"pathComponents":["ShapeError","tooManySides(count:limit:)"],"names":{"title":"ShapeError.tooManySides(count:limit:)","subHeading":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"tooManySides"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"count"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"limit"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":")"}]},"declarationFragments":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"tooManySides"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"count"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"limit"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":56,"character":9}}},{"kind":{"identifier":"swift.enum.case","displayName":"Case"},"identifier":{"precise":"s:9SwiftDemo10ShapeErrorO7unknownyA2CmF","interfaceLanguage":"swift"},"pathComponents":["ShapeError","unknown"],"names":{"title":"ShapeError.unknown","subHeading":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"unknown"}]},"declarationFragments":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"unknown"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":57,"character":9}}},{"kind":{"identifier":"swift.enum","displayName":"Enumeration"},"identifier":{"precise":"s:9SwiftDemo11MeasurementO","interfaceLanguage":"swift"},"pathComponents":["Measurement"],"names":{"title":"Measurement","navigator":[{"kind":"identifier","spelling":"Measurement"}],"subHeading":[{"kind":"keyword","spelling":"enum"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Measurement"}]},"declarationFragments":[{"kind":"keyword","spelling":"enum"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Measurement"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":60,"character":12}}},{"kind":{"identifier":"swift.enum.case","displayName":"Case"},"identifier":{"precise":"s:9SwiftDemo11MeasurementO6lengthyACSdcACmF","interfaceLanguage":"swift"},"pathComponents":["Measurement","length(_:)"],"names":{"title":"Measurement.length(_:)","subHeading":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"length"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}]},"declarationFragments":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"length"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":61,"character":9}}},{"kind":{"identifier":"swift.enum.case","displayName":"Case"},"identifier":{"precise":"s:9SwiftDemo11MeasurementO4areayACSd_SdtcACmF","interfaceLanguage":"swift"},"pathComponents":["Measurement","area(width:height:)"],"names":{"title":"Measurement.area(width:height:)","subHeading":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"area"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"width"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"height"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}]},"declarationFragments":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"area"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"width"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"height"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":62,"character":9}}},{"kind":{"identifier":"swift.enum.case","displayName":"Case"},"identifier":{"precise":"s:9SwiftDemo11MeasurementO4noneyA2CmF","interfaceLanguage":"swift"},"pathComponents":["Measurement","none"],"names":{"title":"Measurement.none","subHeading":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"none"}]},"declarationFragments":[{"kind":"keyword","spelling":"case"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"none"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":63,"character":9}}},{"kind":{"identifier":"swift.struct","displayName":"Structure"},"identifier":{"precise":"s:9SwiftDemo11MeasurementO4UnitV","interfaceLanguage":"swift"},"pathComponents":["Measurement","Unit"],"names":{"title":"Measurement.Unit","navigator":[{"kind":"identifier","spelling":"Unit"}],"subHeading":[{"kind":"keyword","spelling":"struct"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Unit"}]},"declarationFragments":[{"kind":"keyword","spelling":"struct"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Unit"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":65,"character":18}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo11MeasurementO4UnitV6symbolSSvp","interfaceLanguage":"swift"},"pathComponents":["Measurement","Unit","symbol"],"names":{"title":"symbol","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"symbol"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"symbol"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":66,"character":19}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo11MeasurementO4UnitV6symbolAESS_tcfc","interfaceLanguage":"swift"},"pathComponents":["Measurement","Unit","init(symbol:)"],"names":{"title":"init(symbol:)","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"symbol"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"symbol","declarationFragments":[{"kind":"identifier","spelling":"symbol"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]}]},"declarationFragments":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"symbol"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":67,"character":15}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo11MeasurementO6isNoneSbvp","interfaceLanguage":"swift"},"pathComponents":["Measurement","isNone"],"names":{"title":"isNone","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"isNone"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Bool","preciseIdentifier":"s:Sb"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"isNone"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Bool","preciseIdentifier":"s:Sb"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":70,"character":15}}},{"kind":{"identifier":"swift.struct","displayName":"Structure"},"identifier":{"precise":"s:9SwiftDemo4RingV","interfaceLanguage":"swift"},"pathComponents":["Ring"],"names":{"title":"Ring","navigator":[{"kind":"identifier","spelling":"Ring"}],"subHeading":[{"kind":"keyword","spelling":"struct"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Ring"}]},"declarationFragments":[{"kind":"keyword","spelling":"struct"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Ring"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":76,"character":14}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo4RingV5innerAA5PointVvp","interfaceLanguage":"swift"},"pathComponents":["Ring","inner"],"names":{"title":"inner","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"inner"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"inner"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":77,"character":15}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo4RingV5outerAA5PointVvp","interfaceLanguage":"swift"},"pathComponents":["Ring","outer"],"names":{"title":"outer","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"outer"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"outer"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":78,"character":15}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo4RingV5inner5outerAcA5PointV_AGtcfc","interfaceLanguage":"swift"},"pathComponents":["Ring","init(inner:outer:)"],"names":{"title":"init(inner:outer:)","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"inner"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"outer"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"inner","declarationFragments":[{"kind":"identifier","spelling":"inner"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}]},{"name":"outer","declarationFragments":[{"kind":"identifier","spelling":"outer"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}]}]},"declarationFragments":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"inner"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"outer"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":80,"character":11}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo4RingV6expand2byySd_tF","interfaceLanguage":"swift"},"pathComponents":["Ring","expand(by:)"],"names":{"title":"expand(by:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"expand"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"by"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"by","internalName":"delta","declarationFragments":[{"kind":"identifier","spelling":"delta"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]}],"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"mutating"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"expand"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"by"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"delta"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":85,"character":25}}},{"kind":{"identifier":"swift.func.op","displayName":"Operator"},"identifier":{"precise":"s:9SwiftDemo4RingV1poiyA2C_ACtFZ","interfaceLanguage":"swift"},"pathComponents":["Ring","+(_:_:)"],"names":{"title":"+(_:_:)","subHeading":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"+"},{"kind":"text","spelling":" "},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"Ring","preciseIdentifier":"s:9SwiftDemo4RingV"},{"kind":"text","spelling":", "},{"kind":"typeIdentifier","spelling":"Ring","preciseIdentifier":"s:9SwiftDemo4RingV"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Ring","preciseIdentifier":"s:9SwiftDemo4RingV"}]},"functionSignature":{"parameters":[{"name":"lhs","declarationFragments":[{"kind":"identifier","spelling":"lhs"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Ring","preciseIdentifier":"s:9SwiftDemo4RingV"}]},{"name":"rhs","declarationFragments":[{"kind":"identifier","spelling":"rhs"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Ring","preciseIdentifier":"s:9SwiftDemo4RingV"}]}],"returns":[{"kind":"typeIdentifier","spelling":"Ring","preciseIdentifier":"s:9SwiftDemo4RingV"}]},"declarationFragments":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"+"},{"kind":"text","spelling":" "},{"kind":"text","spelling":"("},{"kind":"internalParam","spelling":"lhs"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Ring","preciseIdentifier":"s:9SwiftDemo4RingV"},{"kind":"text","spelling":", "},{"kind":"internalParam","spelling":"rhs"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Ring","preciseIdentifier":"s:9SwiftDemo4RingV"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Ring","preciseIdentifier":"s:9SwiftDemo4RingV"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":90,"character":23}}},{"kind":{"identifier":"swift.class","displayName":"Class"},"identifier":{"precise":"s:9SwiftDemo7CounterC","interfaceLanguage":"swift"},"pathComponents":["Counter"],"names":{"title":"Counter","navigator":[{"kind":"identifier","spelling":"Counter"}],"subHeading":[{"kind":"keyword","spelling":"actor"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Counter"}]},"declarationFragments":[{"kind":"keyword","spelling":"actor"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Counter"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":95,"character":13}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:ScA12_ConcurrencyE18withSerialExecutoryqd__qd__Scf_pqd_0_YKXEqd_0_YKs5ErrorRd_0_Ri_d__r0_lF::SYNTHESIZED::s:9SwiftDemo7CounterC","interfaceLanguage":"swift"},"pathComponents":["Counter","withSerialExecutor(_:)"],"names":{"title":"withSerialExecutor(_:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"withSerialExecutor"},{"kind":"text","spelling":"<"},{"kind":"genericParameter","spelling":"T"},{"kind":"text","spelling":", "},{"kind":"genericParameter","spelling":"E"},{"kind":"text","spelling":">((any "},{"kind":"typeIdentifier","spelling":"SerialExecutor","preciseIdentifier":"s:Scf"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T"}]},"docComment":{"module":"_Concurrency","lines":[{"text":"Perform an operation with the actor's ``SerialExecutor``."},{"text":""},{"text":"This converts the actor's ``Actor/unownedExecutor`` to a ``SerialExecutor`` while"},{"text":"retaining the actor for the duration of the operation. This is to ensure the lifetime"},{"text":"of the executor while performing the operation."}]},"functionSignature":{"parameters":[{"name":"operation","declarationFragments":[{"kind":"identifier","spelling":"operation"},{"kind":"text","spelling":": (any "},{"kind":"typeIdentifier","spelling":"SerialExecutor","preciseIdentifier":"s:Scf"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T"}]}],"returns":[{"kind":"typeIdentifier","spelling":"T"}]},"swiftGenerics":{"parameters":[{"name":"T","index":0,"depth":1},{"name":"E","index":1,"depth":1}],"constraints":[{"kind":"conformance","lhs":"E","rhs":"Error","rhsPrecise":"s:s5ErrorP"}]},"swiftExtension":{"extendedModule":"_Concurrency","typeKind":"swift.protocol"},"declarationFragments":[{"kind":"attribute","spelling":"nonisolated"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"withSerialExecutor"},{"kind":"text","spelling":"<"},{"kind":"genericParameter","spelling":"T"},{"kind":"text","spelling":", "},{"kind":"genericParameter","spelling":"E"},{"kind":"text","spelling":">("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"operation"},{"kind":"text","spelling":": (any "},{"kind":"typeIdentifier","spelling":"SerialExecutor","preciseIdentifier":"s:Scf"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"where"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":" : "},{"kind":"typeIdentifier","spelling":"Error","preciseIdentifier":"s:s5ErrorP"},{"kind":"text","spelling":", "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":" : ~Copyable"}],"accessLevel":"public","availability":[{"domain":"iOS","introduced":{"major":13,"minor":0}},{"domain":"macOS","introduced":{"major":10,"minor":15}},{"domain":"tvOS","introduced":{"major":13,"minor":0}},{"domain":"watchOS","introduced":{"major":6,"minor":0}}]},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:ScA12_ConcurrencyE18withSerialExecutoryqd__qd__Scf_pYaqd_0_YKYCXEYaqd_0_YKs5ErrorRd_0_Ri_d__r0_lF::SYNTHESIZED::s:9SwiftDemo7CounterC","interfaceLanguage":"swift"},"pathComponents":["Counter","withSerialExecutor(_:)"],"names":{"title":"withSerialExecutor(_:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"withSerialExecutor"},{"kind":"text","spelling":"<"},{"kind":"genericParameter","spelling":"T"},{"kind":"text","spelling":", "},{"kind":"genericParameter","spelling":"E"},{"kind":"text","spelling":">("},{"kind":"keyword","spelling":"nonisolated(nonsending)"},{"kind":"text","spelling":" (any "},{"kind":"typeIdentifier","spelling":"SerialExecutor","preciseIdentifier":"s:Scf"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"async"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"async"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T"}]},"docComment":{"module":"_Concurrency","lines":[{"text":"Perform an operation with the actor's ``SerialExecutor``."},{"text":""},{"text":"This converts the actor's ``Actor/unownedExecutor`` to a ``SerialExecutor`` while"},{"text":"retaining the actor for the duration of the operation. This is to ensure the lifetime"},{"text":"of the executor while performing the operation."}]},"functionSignature":{"parameters":[{"name":"operation","declarationFragments":[{"kind":"identifier","spelling":"operation"},{"kind":"text","spelling":": (any "},{"kind":"typeIdentifier","spelling":"SerialExecutor","preciseIdentifier":"s:Scf"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"async"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T"}]}],"returns":[{"kind":"typeIdentifier","spelling":"T"}]},"swiftGenerics":{"parameters":[{"name":"T","index":0,"depth":1},{"name":"E","index":1,"depth":1}],"constraints":[{"kind":"conformance","lhs":"E","rhs":"Error","rhsPrecise":"s:s5ErrorP"}]},"swiftExtension":{"extendedModule":"_Concurrency","typeKind":"swift.protocol"},"declarationFragments":[{"kind":"attribute","spelling":"nonisolated"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"withSerialExecutor"},{"kind":"text","spelling":"<"},{"kind":"genericParameter","spelling":"T"},{"kind":"text","spelling":", "},{"kind":"genericParameter","spelling":"E"},{"kind":"text","spelling":">("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"operation"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"nonisolated(nonsending)"},{"kind":"text","spelling":" (any "},{"kind":"typeIdentifier","spelling":"SerialExecutor","preciseIdentifier":"s:Scf"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"async"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"async"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"where"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"E"},{"kind":"text","spelling":" : "},{"kind":"typeIdentifier","spelling":"Error","preciseIdentifier":"s:s5ErrorP"},{"kind":"text","spelling":", "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":" : ~Copyable"}],"accessLevel":"public","availability":[{"domain":"iOS","introduced":{"major":13,"minor":0}},{"domain":"macOS","introduced":{"major":10,"minor":15}},{"domain":"tvOS","introduced":{"major":13,"minor":0}},{"domain":"watchOS","introduced":{"major":6,"minor":0}}]},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:ScA12_ConcurrencyE20preconditionIsolated_4file4lineySSyXK_s12StaticStringVSutF::SYNTHESIZED::s:9SwiftDemo7CounterC","interfaceLanguage":"swift"},"pathComponents":["Counter","preconditionIsolated(_:file:line:)"],"names":{"title":"preconditionIsolated(_:file:line:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"preconditionIsolated"},{"kind":"text","spelling":"("},{"kind":"attribute","spelling":"@autoclosure "},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"file"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"line"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"UInt","preciseIdentifier":"s:Su"},{"kind":"text","spelling":")"}]},"docComment":{"module":"_Concurrency","lines":[{"text":"Stops program execution if the current task is not executing on this"},{"text":"actor's serial executor."},{"text":""},{"text":"This function's effect varies depending on the build flag used:"},{"text":""},{"text":"* In playgrounds and `-Onone` builds (the default for Xcode's Debug"},{"text":" configuration), stops program execution in a debuggable state after"},{"text":" printing `message`."},{"text":""},{"text":"* In `-O` builds (the default for Xcode's Release configuration), stops"},{"text":" program execution."},{"text":""},{"text":"- Note: Because this check is performed against the actor's serial executor,"},{"text":" if another actor uses the same serial executor--by using"},{"text":" that actor's serial executor as its own ``Actor/unownedExecutor``--this"},{"text":" check will succeed. From a concurrency safety perspective, the"},{"text":" serial executor guarantees mutual exclusion of those two actors."},{"text":""},{"text":"- Parameters:"},{"text":" - message: The message to print if the assertion fails."},{"text":" - file: The file name to print if the assertion fails. The default is"},{"text":" where this method was called."},{"text":" - line: The line number to print if the assertion fails The default is"},{"text":" where this method was called."}]},"functionSignature":{"parameters":[{"name":"message","declarationFragments":[{"kind":"identifier","spelling":"message"},{"kind":"text","spelling":": () -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},{"name":"file","declarationFragments":[{"kind":"identifier","spelling":"file"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"StaticString","preciseIdentifier":"s:s12StaticStringV"}]},{"name":"line","declarationFragments":[{"kind":"identifier","spelling":"line"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"UInt","preciseIdentifier":"s:Su"}]}],"returns":[{"kind":"text","spelling":"()"}]},"swiftExtension":{"extendedModule":"_Concurrency","typeKind":"swift.protocol"},"declarationFragments":[{"kind":"text","spelling":"@backDeployed(before: macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0)\n"},{"kind":"attribute","spelling":"nonisolated"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"preconditionIsolated"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"message"},{"kind":"text","spelling":": "},{"kind":"attribute","spelling":"@autoclosure "},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":" = String(), "},{"kind":"externalParam","spelling":"file"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","spelling":" = "},{"kind":"keyword","spelling":"#fileID"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"line"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"UInt","preciseIdentifier":"s:Su"},{"kind":"text","spelling":" = "},{"kind":"keyword","spelling":"#line"},{"kind":"text","spelling":")"}],"accessLevel":"public","availability":[{"domain":"iOS","introduced":{"major":13,"minor":0}},{"domain":"macOS","introduced":{"major":10,"minor":15}},{"domain":"tvOS","introduced":{"major":13,"minor":0}},{"domain":"watchOS","introduced":{"major":6,"minor":0}}]},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:ScA12_ConcurrencyE14assertIsolated_4file4lineySSyXK_s12StaticStringVSutF::SYNTHESIZED::s:9SwiftDemo7CounterC","interfaceLanguage":"swift"},"pathComponents":["Counter","assertIsolated(_:file:line:)"],"names":{"title":"assertIsolated(_:file:line:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"assertIsolated"},{"kind":"text","spelling":"("},{"kind":"attribute","spelling":"@autoclosure "},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"file"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"line"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"UInt","preciseIdentifier":"s:Su"},{"kind":"text","spelling":")"}]},"docComment":{"module":"_Concurrency","lines":[{"text":"Stops program execution if the current task is not executing on this"},{"text":"actor's serial executor."},{"text":""},{"text":"This function's effect varies depending on the build flag used:"},{"text":""},{"text":"* In playgrounds and `-Onone` builds (the default for Xcode's Debug"},{"text":" configuration), stops program execution in a debuggable state after"},{"text":" printing `message`."},{"text":""},{"text":"* In `-O` builds (the default for Xcode's Release configuration),"},{"text":" the isolation check is not performed and there are no effects."},{"text":""},{"text":"- Note: This check is performed against the actor's serial executor,"},{"text":" meaning that / if another actor uses the same serial executor--by using"},{"text":" that actor's serial executor as its own ``Actor/unownedExecutor``--this"},{"text":" check will succeed , as from a concurrency safety perspective, the"},{"text":" serial executor guarantees mutual exclusion of those two actors."},{"text":""},{"text":"- Parameters:"},{"text":" - message: The message to print if the assertion fails."},{"text":" - file: The file name to print if the assertion fails. The default is"},{"text":" where this method was called."},{"text":" - line: The line number to print if the assertion fails The default is"},{"text":" where this method was called."}]},"functionSignature":{"parameters":[{"name":"message","declarationFragments":[{"kind":"identifier","spelling":"message"},{"kind":"text","spelling":": () -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},{"name":"file","declarationFragments":[{"kind":"identifier","spelling":"file"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"StaticString","preciseIdentifier":"s:s12StaticStringV"}]},{"name":"line","declarationFragments":[{"kind":"identifier","spelling":"line"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"UInt","preciseIdentifier":"s:Su"}]}],"returns":[{"kind":"text","spelling":"()"}]},"swiftExtension":{"extendedModule":"_Concurrency","typeKind":"swift.protocol"},"declarationFragments":[{"kind":"text","spelling":"@backDeployed(before: macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0)\n"},{"kind":"attribute","spelling":"nonisolated"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"assertIsolated"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"message"},{"kind":"text","spelling":": "},{"kind":"attribute","spelling":"@autoclosure "},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":" = String(), "},{"kind":"externalParam","spelling":"file"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","spelling":" = "},{"kind":"keyword","spelling":"#fileID"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"line"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"UInt","preciseIdentifier":"s:Su"},{"kind":"text","spelling":" = "},{"kind":"keyword","spelling":"#line"},{"kind":"text","spelling":")"}],"accessLevel":"public","availability":[{"domain":"iOS","introduced":{"major":13,"minor":0}},{"domain":"macOS","introduced":{"major":10,"minor":15}},{"domain":"tvOS","introduced":{"major":13,"minor":0}},{"domain":"watchOS","introduced":{"major":6,"minor":0}}]},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:ScA12_ConcurrencyE14assumeIsolated_4file4lineqd__qd__xYiKXE_s12StaticStringVSutKs8SendableRd__lF::SYNTHESIZED::s:9SwiftDemo7CounterC","interfaceLanguage":"swift"},"pathComponents":["Counter","assumeIsolated(_:file:line:)"],"names":{"title":"assumeIsolated(_:file:line:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"assumeIsolated"},{"kind":"text","spelling":"<"},{"kind":"genericParameter","spelling":"T"},{"kind":"text","spelling":">(("},{"kind":"keyword","spelling":"isolated"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Self"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":" -> "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"file"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"line"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"UInt","preciseIdentifier":"s:Su"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"rethrows"},{"kind":"text","spelling":" -> "},{"kind":"typeIdentifier","spelling":"T"}]},"docComment":{"module":"_Concurrency","lines":[{"text":"Assume that the current task is executing on this actor's serial executor,"},{"text":"or stop program execution otherwise."},{"text":""},{"text":"You call this method to *assume and verify* that the currently"},{"text":"executing synchronous function is actually executing on the serial"},{"text":"executor of this actor."},{"text":""},{"text":"If that is the case, the operation is invoked with an `isolated` version"},{"text":"of the actor, allowing synchronous access to actor local state without"},{"text":"hopping through asynchronous boundaries."},{"text":""},{"text":"If the current context is not running on the actor's serial executor, or"},{"text":"if the actor is a reference to a remote actor, this method will crash"},{"text":"with a fatal error (similar to ``preconditionIsolated(_:file:line:)``)."},{"text":""},{"text":"Note that this check is performed against the passed in actor's serial"},{"text":"executor, meaning that if another actor uses the same serial executor--by"},{"text":"using that actor's ``Actor/unownedExecutor`` as its own"},{"text":"``Actor/unownedExecutor``--this check will succeed, as from a concurrency"},{"text":"safety perspective, the serial executor guarantees mutual exclusion of"},{"text":"those two actors."},{"text":""},{"text":"This method can only be used from synchronous functions, as asynchronous"},{"text":"functions should instead perform a normal method call to the actor, which"},{"text":"will hop task execution to the target actor if necessary."},{"text":""},{"text":"- Note: This check is performed against the actor's serial executor,"},{"text":" meaning that / if another actor uses the same serial executor--by using"},{"text":" another actor's executor as its own ``Actor/unownedExecutor``"},{"text":" --this check will succeed , as from a concurrency safety perspective,"},{"text":" the serial executor guarantees mutual exclusion of those two actors."},{"text":""},{"text":"- Parameters:"},{"text":" - operation: the operation that will be executed if the current context"},{"text":" is executing on the actors serial executor."},{"text":" - file: The file name to print if the assertion fails. The default is"},{"text":" where this method was called."},{"text":" - line: The line number to print if the assertion fails The default is"},{"text":" where this method was called."},{"text":"- Returns: the return value of the `operation`"},{"text":"- Throws: rethrows the `Error` thrown by the operation if it threw"}]},"functionSignature":{"parameters":[{"name":"operation","declarationFragments":[{"kind":"identifier","spelling":"operation"},{"kind":"text","spelling":": ("},{"kind":"keyword","spelling":"isolated"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Self"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":" -> "},{"kind":"typeIdentifier","spelling":"T"}]},{"name":"file","declarationFragments":[{"kind":"identifier","spelling":"file"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"StaticString","preciseIdentifier":"s:s12StaticStringV"}]},{"name":"line","declarationFragments":[{"kind":"identifier","spelling":"line"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"UInt","preciseIdentifier":"s:Su"}]}],"returns":[{"kind":"typeIdentifier","spelling":"T"}]},"swiftGenerics":{"parameters":[{"name":"T","index":0,"depth":1}],"constraints":[{"kind":"conformance","lhs":"T","rhs":"Sendable","rhsPrecise":"s:s8SendableP"}]},"swiftExtension":{"extendedModule":"_Concurrency","typeKind":"swift.protocol"},"declarationFragments":[{"kind":"attribute","spelling":"nonisolated"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"assumeIsolated"},{"kind":"text","spelling":"<"},{"kind":"genericParameter","spelling":"T"},{"kind":"text","spelling":">("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"operation"},{"kind":"text","spelling":": ("},{"kind":"keyword","spelling":"isolated"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Self"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":" -> "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"file"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","spelling":" = "},{"kind":"keyword","spelling":"#fileID"},{"kind":"text","spelling":", "},{"kind":"externalParam","spelling":"line"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"UInt","preciseIdentifier":"s:Su"},{"kind":"text","spelling":" = "},{"kind":"keyword","spelling":"#line"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"rethrows"},{"kind":"text","spelling":" -> "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"where"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":" : "},{"kind":"typeIdentifier","spelling":"Sendable","preciseIdentifier":"s:s8SendableP"}],"accessLevel":"public","availability":[{"domain":"iOS","introduced":{"major":13,"minor":0}},{"domain":"macOS","introduced":{"major":10,"minor":15}},{"domain":"tvOS","introduced":{"major":13,"minor":0}},{"domain":"watchOS","introduced":{"major":6,"minor":0}}]},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo7CounterC5valueSivp","interfaceLanguage":"swift"},"pathComponents":["Counter","value"],"names":{"title":"value","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"value"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"value"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":" { get }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":96,"character":28}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo7CounterCACycfc","interfaceLanguage":"swift"},"pathComponents":["Counter","init()"],"names":{"title":"init()","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"()"}]},"functionSignature":{},"declarationFragments":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"()"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":97,"character":11}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo7CounterC9incrementSiyF","interfaceLanguage":"swift"},"pathComponents":["Counter","increment()"],"names":{"title":"increment()","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"increment"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"functionSignature":{"returns":[{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"increment"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":98,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo7CounterC5labelSSyF","interfaceLanguage":"swift"},"pathComponents":["Counter","label()"],"names":{"title":"label()","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"label"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"functionSignature":{"returns":[{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"declarationFragments":[{"kind":"attribute","spelling":"nonisolated"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"label"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":102,"character":28}}},{"kind":{"identifier":"swift.class","displayName":"Class"},"identifier":{"precise":"s:9SwiftDemo6CanvasC","interfaceLanguage":"swift"},"pathComponents":["Canvas"],"names":{"title":"Canvas","navigator":[{"kind":"identifier","spelling":"Canvas"}],"subHeading":[{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Canvas"}]},"declarationFragments":[{"kind":"attribute","spelling":"@"},{"kind":"attribute","spelling":"MainActor","preciseIdentifier":"s:ScM"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"final"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Canvas"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":106,"character":19}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo6CanvasCACycfc","interfaceLanguage":"swift"},"pathComponents":["Canvas","init()"],"names":{"title":"init()","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"()"}]},"functionSignature":{},"declarationFragments":[{"kind":"attribute","spelling":"@"},{"kind":"attribute","spelling":"MainActor","preciseIdentifier":"s:ScM"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"()"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":107,"character":11}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6CanvasC4drawyyAA5Shape_pF","interfaceLanguage":"swift"},"pathComponents":["Canvas","draw(_:)"],"names":{"title":"draw(_:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"draw"},{"kind":"text","spelling":"("},{"kind":"keyword","spelling":"any"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Shape","preciseIdentifier":"s:9SwiftDemo5ShapeP"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"shape","declarationFragments":[{"kind":"identifier","spelling":"shape"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"any"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Shape","preciseIdentifier":"s:9SwiftDemo5ShapeP"}]}],"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"attribute","spelling":"@"},{"kind":"attribute","spelling":"MainActor","preciseIdentifier":"s:ScM"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"draw"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"shape"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"any"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Shape","preciseIdentifier":"s:9SwiftDemo5ShapeP"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":108,"character":16}}},{"kind":{"identifier":"swift.class","displayName":"Class"},"identifier":{"precise":"s:9SwiftDemo6LoaderC","interfaceLanguage":"swift"},"pathComponents":["Loader"],"names":{"title":"Loader","navigator":[{"kind":"identifier","spelling":"Loader"}],"subHeading":[{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Loader"}]},"declarationFragments":[{"kind":"keyword","spelling":"final"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Loader"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":111,"character":19}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo6LoaderCACycfc","interfaceLanguage":"swift"},"pathComponents":["Loader","init()"],"names":{"title":"init()","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"()"}]},"functionSignature":{},"declarationFragments":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"()"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":112,"character":11}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC4load4path10Foundation4DataVSS_tKF","interfaceLanguage":"swift"},"pathComponents":["Loader","load(path:)"],"names":{"title":"load(path:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"load"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"path"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":" -> "},{"kind":"typeIdentifier","spelling":"Data","preciseIdentifier":"s:10Foundation4DataV"}]},"functionSignature":{"parameters":[{"name":"path","declarationFragments":[{"kind":"identifier","spelling":"path"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]}],"returns":[{"kind":"typeIdentifier","spelling":"Data","preciseIdentifier":"s:10Foundation4DataV"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"load"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"path"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":" -> "},{"kind":"typeIdentifier","spelling":"Data","preciseIdentifier":"s:10Foundation4DataV"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":114,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC5fetch3urlSS10Foundation3URLV_tYaKF","interfaceLanguage":"swift"},"pathComponents":["Loader","fetch(url:)"],"names":{"title":"fetch(url:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"fetch"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"url"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"URL","preciseIdentifier":"s:10Foundation3URLV"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"async"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":" -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"functionSignature":{"parameters":[{"name":"url","declarationFragments":[{"kind":"identifier","spelling":"url"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"URL","preciseIdentifier":"s:10Foundation3URLV"}]}],"returns":[{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"fetch"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"url"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"URL","preciseIdentifier":"s:10Foundation3URLV"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"async"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":" -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":115,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC4wait7secondsySd_tYaF","interfaceLanguage":"swift"},"pathComponents":["Loader","wait(seconds:)"],"names":{"title":"wait(seconds:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"wait"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"seconds"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"async"}]},"functionSignature":{"parameters":[{"name":"seconds","declarationFragments":[{"kind":"identifier","spelling":"seconds"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]}],"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"wait"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"seconds"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"async"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":116,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC9transformyxxAA5ShapeRzlF","interfaceLanguage":"swift"},"pathComponents":["Loader","transform(_:)"],"names":{"title":"transform(_:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"transform"},{"kind":"text","spelling":"<"},{"kind":"genericParameter","spelling":"T"},{"kind":"text","spelling":">("},{"kind":"typeIdentifier","spelling":"T","preciseIdentifier":"s:9SwiftDemo6LoaderC9transformyxxAA5ShapeRzlF1TL_xmfp"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T","preciseIdentifier":"s:9SwiftDemo6LoaderC9transformyxxAA5ShapeRzlF1TL_xmfp"}]},"functionSignature":{"parameters":[{"name":"shape","declarationFragments":[{"kind":"identifier","spelling":"shape"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"T","preciseIdentifier":"s:9SwiftDemo6LoaderC9transformyxxAA5ShapeRzlF1TL_xmfp"}]}],"returns":[{"kind":"typeIdentifier","spelling":"T"}]},"swiftGenerics":{"parameters":[{"name":"T","index":0,"depth":0}],"constraints":[{"kind":"conformance","lhs":"T","rhs":"Shape","rhsPrecise":"s:9SwiftDemo5ShapeP"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"transform"},{"kind":"text","spelling":"<"},{"kind":"genericParameter","spelling":"T"},{"kind":"text","spelling":">("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"shape"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"T","preciseIdentifier":"s:9SwiftDemo6LoaderC9transformyxxAA5ShapeRzlF1TL_xmfp"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"T","preciseIdentifier":"s:9SwiftDemo6LoaderC9transformyxxAA5ShapeRzlF1TL_xmfp"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"where"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"T"},{"kind":"text","spelling":" : "},{"kind":"typeIdentifier","spelling":"Shape","preciseIdentifier":"s:9SwiftDemo5ShapeP"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":118,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC5first2ofxSgSayxG_tlF","interfaceLanguage":"swift"},"pathComponents":["Loader","first(of:)"],"names":{"title":"first(of:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"first"},{"kind":"text","spelling":"<"},{"kind":"genericParameter","spelling":"Element"},{"kind":"text","spelling":">("},{"kind":"externalParam","spelling":"of"},{"kind":"text","spelling":": ["},{"kind":"typeIdentifier","spelling":"Element","preciseIdentifier":"s:9SwiftDemo6LoaderC5first2ofxSgSayxG_tlF7ElementL_xmfp"},{"kind":"text","spelling":"]) -> "},{"kind":"typeIdentifier","spelling":"Element","preciseIdentifier":"s:9SwiftDemo6LoaderC5first2ofxSgSayxG_tlF7ElementL_xmfp"},{"kind":"text","spelling":"?"}]},"functionSignature":{"parameters":[{"name":"of","internalName":"items","declarationFragments":[{"kind":"identifier","spelling":"items"},{"kind":"text","spelling":": ["},{"kind":"typeIdentifier","spelling":"Element","preciseIdentifier":"s:9SwiftDemo6LoaderC5first2ofxSgSayxG_tlF7ElementL_xmfp"},{"kind":"text","spelling":"]"}]}],"returns":[{"kind":"typeIdentifier","spelling":"Element"},{"kind":"text","spelling":"?"}]},"swiftGenerics":{"parameters":[{"name":"Element","index":0,"depth":0}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"first"},{"kind":"text","spelling":"<"},{"kind":"genericParameter","spelling":"Element"},{"kind":"text","spelling":">("},{"kind":"externalParam","spelling":"of"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"items"},{"kind":"text","spelling":": ["},{"kind":"typeIdentifier","spelling":"Element","preciseIdentifier":"s:9SwiftDemo6LoaderC5first2ofxSgSayxG_tlF7ElementL_xmfp"},{"kind":"text","spelling":"]) -> "},{"kind":"typeIdentifier","spelling":"Element","preciseIdentifier":"s:9SwiftDemo6LoaderC5first2ofxSgSayxG_tlF7ElementL_xmfp"},{"kind":"text","spelling":"?"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":119,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC14withCompletionyyys6ResultOySSAA10ShapeErrorOGcF","interfaceLanguage":"swift"},"pathComponents":["Loader","withCompletion(_:)"],"names":{"title":"withCompletion(_:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"withCompletion"},{"kind":"text","spelling":"(("},{"kind":"typeIdentifier","spelling":"Result","preciseIdentifier":"s:s6ResultO"},{"kind":"text","spelling":"<"},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":", "},{"kind":"typeIdentifier","spelling":"ShapeError","preciseIdentifier":"s:9SwiftDemo10ShapeErrorO"},{"kind":"text","spelling":">) -> "},{"kind":"typeIdentifier","spelling":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"completion","declarationFragments":[{"kind":"identifier","spelling":"completion"},{"kind":"text","spelling":": "},{"kind":"attribute","spelling":"@escaping"},{"kind":"text","spelling":" ("},{"kind":"typeIdentifier","spelling":"Result","preciseIdentifier":"s:s6ResultO"},{"kind":"text","spelling":"<"},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":", "},{"kind":"typeIdentifier","spelling":"ShapeError","preciseIdentifier":"s:9SwiftDemo10ShapeErrorO"},{"kind":"text","spelling":">) -> "},{"kind":"typeIdentifier","spelling":"Void","preciseIdentifier":"s:s4Voida"}]}],"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"withCompletion"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"completion"},{"kind":"text","spelling":": "},{"kind":"attribute","spelling":"@escaping"},{"kind":"text","spelling":" ("},{"kind":"typeIdentifier","spelling":"Result","preciseIdentifier":"s:s6ResultO"},{"kind":"text","spelling":"<"},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":", "},{"kind":"typeIdentifier","spelling":"ShapeError","preciseIdentifier":"s:9SwiftDemo10ShapeErrorO"},{"kind":"text","spelling":">) -> "},{"kind":"typeIdentifier","spelling":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":121,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC4eachyyySiXEF","interfaceLanguage":"swift"},"pathComponents":["Loader","each(_:)"],"names":{"title":"each(_:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"each"},{"kind":"text","spelling":"(("},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"body","declarationFragments":[{"kind":"identifier","spelling":"body"},{"kind":"text","spelling":": ("},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Void","preciseIdentifier":"s:s4Voida"}]}],"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"each"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"body"},{"kind":"text","spelling":": ("},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":122,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC6lookup5table3keySiSgSDySSSiG_SStF","interfaceLanguage":"swift"},"pathComponents":["Loader","lookup(table:key:)"],"names":{"title":"lookup(table:key:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"lookup"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"table"},{"kind":"text","spelling":": ["},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":" : "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":"], "},{"kind":"externalParam","spelling":"key"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":"?"}]},"functionSignature":{"parameters":[{"name":"table","declarationFragments":[{"kind":"identifier","spelling":"table"},{"kind":"text","spelling":": ["},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":" : "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":"]"}]},{"name":"key","declarationFragments":[{"kind":"identifier","spelling":"key"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]}],"returns":[{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":"?"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"lookup"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"table"},{"kind":"text","spelling":": ["},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":" : "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":"], "},{"kind":"externalParam","spelling":"key"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":"?"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":124,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC6updateyyAA5PointVzF","interfaceLanguage":"swift"},"pathComponents":["Loader","update(_:)"],"names":{"title":"update(_:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"update"},{"kind":"text","spelling":"("},{"kind":"keyword","spelling":"inout"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"point","declarationFragments":[{"kind":"identifier","spelling":"point"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"inout"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}]}],"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"update"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"point"},{"kind":"text","spelling":": "},{"kind":"keyword","spelling":"inout"},{"kind":"text","spelling":" "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":126,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC10modernOnlyyyF","interfaceLanguage":"swift"},"pathComponents":["Loader","modernOnly()"],"names":{"title":"modernOnly()","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"modernOnly"},{"kind":"text","spelling":"()"}]},"functionSignature":{"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"modernOnly"},{"kind":"text","spelling":"()"}],"accessLevel":"public","availability":[{"domain":"iOS","introduced":{"major":16,"minor":0}}],"location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":129,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC11legacyFetchyyF","interfaceLanguage":"swift"},"pathComponents":["Loader","legacyFetch()"],"names":{"title":"legacyFetch()","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"legacyFetch"},{"kind":"text","spelling":"()"}]},"functionSignature":{"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"legacyFetch"},{"kind":"text","spelling":"()"}],"accessLevel":"public","availability":[{"domain":"*","message":"Use fetch(url:) instead","isUnconditionallyDeprecated":true}],"location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":132,"character":16}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo6LoaderC8oldFetchyyF","interfaceLanguage":"swift"},"pathComponents":["Loader","oldFetch()"],"names":{"title":"oldFetch()","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"oldFetch"},{"kind":"text","spelling":"()"}]},"functionSignature":{"returns":[{"kind":"text","spelling":"()"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"oldFetch"},{"kind":"text","spelling":"()"}],"accessLevel":"public","availability":[{"domain":"iOS","introduced":{"major":15,"minor":0},"deprecated":{"major":17,"minor":0},"renamed":"fetch(url:)"}],"location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":135,"character":16}}},{"kind":{"identifier":"swift.func","displayName":"Function"},"identifier":{"precise":"s:9SwiftDemo16makeDefaultPointAA0E0VyF","interfaceLanguage":"swift"},"pathComponents":["makeDefaultPoint()"],"names":{"title":"makeDefaultPoint()","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"makeDefaultPoint"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}]},"functionSignature":{"returns":[{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"makeDefaultPoint"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":138,"character":12}}},{"kind":{"identifier":"swift.var","displayName":"Global Variable"},"identifier":{"precise":"s:9SwiftDemo13defaultFlavorAA0D0Ovp","interfaceLanguage":"swift"},"pathComponents":["defaultFlavor"],"names":{"title":"defaultFlavor","subHeading":[{"kind":"keyword","spelling":"let"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"defaultFlavor"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Flavor","preciseIdentifier":"s:9SwiftDemo6FlavorO"}]},"declarationFragments":[{"kind":"keyword","spelling":"let"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"defaultFlavor"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Flavor","preciseIdentifier":"s:9SwiftDemo6FlavorO"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":139,"character":11}}},{"kind":{"identifier":"swift.var","displayName":"Global Variable"},"identifier":{"precise":"s:9SwiftDemo13globalCounterSivp","interfaceLanguage":"swift"},"pathComponents":["globalCounter"],"names":{"title":"globalCounter","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"globalCounter"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"globalCounter"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":140,"character":11}}},{"kind":{"identifier":"swift.typealias","displayName":"Type Alias"},"identifier":{"precise":"s:9SwiftDemo11Coordinatesa","interfaceLanguage":"swift"},"pathComponents":["Coordinates"],"names":{"title":"Coordinates","navigator":[{"kind":"identifier","spelling":"Coordinates"}],"subHeading":[{"kind":"keyword","spelling":"typealias"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Coordinates"}]},"declarationFragments":[{"kind":"keyword","spelling":"typealias"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Coordinates"},{"kind":"text","spelling":" = (latitude"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":", longitude"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Shapes.swift","position":{"line":141,"character":17}}},{"kind":{"identifier":"swift.func","displayName":"Function"},"identifier":{"precise":"s:9SwiftDemo11checkedSideyS2dKF","interfaceLanguage":"swift"},"pathComponents":["checkedSide(_:)"],"names":{"title":"checkedSide(_:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"checkedSide"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":" -> "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]},"functionSignature":{"parameters":[{"name":"side","declarationFragments":[{"kind":"identifier","spelling":"side"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]}],"returns":[{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"checkedSide"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"side"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"},{"kind":"text","spelling":") "},{"kind":"keyword","spelling":"throws"},{"kind":"text","spelling":" -> "},{"kind":"typeIdentifier","spelling":"Double","preciseIdentifier":"s:Sd"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Values.swift","position":{"line":3,"character":12}}},{"kind":{"identifier":"swift.func","displayName":"Function"},"identifier":{"precise":"s:9SwiftDemo8echoInt8ys0D0VADF","interfaceLanguage":"swift"},"pathComponents":["echoInt8(_:)"],"names":{"title":"echoInt8(_:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"echoInt8"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"Int8","preciseIdentifier":"s:s4Int8V"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Int8","preciseIdentifier":"s:s4Int8V"}]},"functionSignature":{"parameters":[{"name":"value","declarationFragments":[{"kind":"identifier","spelling":"value"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int8","preciseIdentifier":"s:s4Int8V"}]}],"returns":[{"kind":"typeIdentifier","spelling":"Int8","preciseIdentifier":"s:s4Int8V"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"echoInt8"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"value"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int8","preciseIdentifier":"s:s4Int8V"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"Int8","preciseIdentifier":"s:s4Int8V"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Values.swift","position":{"line":8,"character":12}}},{"kind":{"identifier":"swift.func","displayName":"Function"},"identifier":{"precise":"s:9SwiftDemo10echoUInt64ys0D0VADF","interfaceLanguage":"swift"},"pathComponents":["echoUInt64(_:)"],"names":{"title":"echoUInt64(_:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"echoUInt64"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"UInt64","preciseIdentifier":"s:s6UInt64V"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"UInt64","preciseIdentifier":"s:s6UInt64V"}]},"functionSignature":{"parameters":[{"name":"value","declarationFragments":[{"kind":"identifier","spelling":"value"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"UInt64","preciseIdentifier":"s:s6UInt64V"}]}],"returns":[{"kind":"typeIdentifier","spelling":"UInt64","preciseIdentifier":"s:s6UInt64V"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"echoUInt64"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"value"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"UInt64","preciseIdentifier":"s:s6UInt64V"},{"kind":"text","spelling":") -> "},{"kind":"typeIdentifier","spelling":"UInt64","preciseIdentifier":"s:s6UInt64V"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Values.swift","position":{"line":9,"character":12}}},{"kind":{"identifier":"swift.func","displayName":"Function"},"identifier":{"precise":"s:9SwiftDemo10largestIntSiyF","interfaceLanguage":"swift"},"pathComponents":["largestInt()"],"names":{"title":"largestInt()","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"largestInt"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"functionSignature":{"returns":[{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"largestInt"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Values.swift","position":{"line":10,"character":12}}},{"kind":{"identifier":"swift.func","displayName":"Function"},"identifier":{"precise":"s:9SwiftDemo5shoutySSSgACF","interfaceLanguage":"swift"},"pathComponents":["shout(_:)"],"names":{"title":"shout(_:)","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"shout"},{"kind":"text","spelling":"("},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":"?) -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":"?"}]},"functionSignature":{"parameters":[{"name":"name","declarationFragments":[{"kind":"identifier","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":"?"}]}],"returns":[{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":"?"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"shout"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"_"},{"kind":"text","spelling":" "},{"kind":"internalParam","spelling":"name"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":"?) -> "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":"?"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Values.swift","position":{"line":11,"character":12}}},{"kind":{"identifier":"swift.class","displayName":"Class"},"identifier":{"precise":"s:9SwiftDemo7TrackerC","interfaceLanguage":"swift"},"pathComponents":["Tracker"],"names":{"title":"Tracker","navigator":[{"kind":"identifier","spelling":"Tracker"}],"subHeading":[{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Tracker"}]},"declarationFragments":[{"kind":"keyword","spelling":"final"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"class"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"Tracker"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Values.swift","position":{"line":13,"character":19}}},{"kind":{"identifier":"swift.type.property","displayName":"Type Property"},"identifier":{"precise":"s:9SwiftDemo7TrackerC9liveCountSivpZ","interfaceLanguage":"swift"},"pathComponents":["Tracker","liveCount"],"names":{"title":"liveCount","subHeading":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"liveCount"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"declarationFragments":[{"kind":"keyword","spelling":"static"},{"kind":"text","spelling":" "},{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"liveCount"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":" { get }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Values.swift","position":{"line":14,"character":35}}},{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:9SwiftDemo7TrackerC2idSivp","interfaceLanguage":"swift"},"pathComponents":["Tracker","id"],"names":{"title":"id","subHeading":[{"kind":"keyword","spelling":"let"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"id"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]},"declarationFragments":[{"kind":"keyword","spelling":"let"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"id"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Values.swift","position":{"line":15,"character":15}}},{"kind":{"identifier":"swift.init","displayName":"Initializer"},"identifier":{"precise":"s:9SwiftDemo7TrackerC2idACSi_tcfc","interfaceLanguage":"swift"},"pathComponents":["Tracker","init(id:)"],"names":{"title":"init(id:)","subHeading":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"id"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":")"}]},"functionSignature":{"parameters":[{"name":"id","declarationFragments":[{"kind":"identifier","spelling":"id"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"}]}]},"declarationFragments":[{"kind":"keyword","spelling":"init"},{"kind":"text","spelling":"("},{"kind":"externalParam","spelling":"id"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"Int","preciseIdentifier":"s:Si"},{"kind":"text","spelling":")"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Values.swift","position":{"line":17,"character":11}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:9SwiftDemo7TrackerC4sameACyF","interfaceLanguage":"swift"},"pathComponents":["Tracker","same()"],"names":{"title":"same()","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"same"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Tracker","preciseIdentifier":"s:9SwiftDemo7TrackerC"}]},"functionSignature":{"returns":[{"kind":"typeIdentifier","spelling":"Tracker","preciseIdentifier":"s:9SwiftDemo7TrackerC"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"same"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Tracker","preciseIdentifier":"s:9SwiftDemo7TrackerC"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Values.swift","position":{"line":24,"character":16}}}],"relationships":[{"kind":"requirementOf","source":"s:9SwiftDemo7GreeterP5greet4nameS2S_tF","target":"s:9SwiftDemo7GreeterP"},{"kind":"conformsTo","source":"s:9SwiftDemo0B0C","target":"s:9SwiftDemo7GreeterP"},{"kind":"memberOf","source":"s:9SwiftDemo0B0CACycfc","target":"s:9SwiftDemo0B0C"},{"kind":"memberOf","source":"s:9SwiftDemo0B0C5greet4nameS2S_tF","target":"s:9SwiftDemo0B0C","sourceOrigin":{"identifier":"s:9SwiftDemo7GreeterP5greet4nameS2S_tF","displayName":"Greeter.greet(name:)"}},{"kind":"conformsTo","source":"s:9SwiftDemo5PointV","target":"s:s23CustomStringConvertibleP","targetFallback":"Swift.CustomStringConvertible"},{"kind":"memberOf","source":"s:9SwiftDemo5PointV1xSdvp","target":"s:9SwiftDemo5PointV"},{"kind":"memberOf","source":"s:9SwiftDemo5PointV1ySdvp","target":"s:9SwiftDemo5PointV"},{"kind":"memberOf","source":"s:9SwiftDemo5PointV1x1yACSd_Sdtcfc","target":"s:9SwiftDemo5PointV"},{"kind":"memberOf","source":"s:SYsSHRzSH8RawValueSYRpzrlE04hashB0Sivp::SYNTHESIZED::s:9SwiftDemo6FlavorO","target":"s:9SwiftDemo6FlavorO","sourceOrigin":{"identifier":"s:SYsSHRzSH8RawValueSYRpzrlE04hashB0Sivp","displayName":"RawRepresentable.hashValue"}},{"kind":"memberOf","source":"s:SYsSHRzSH8RawValueSYRpzrlE4hash4intoys6HasherVz_tF::SYNTHESIZED::s:9SwiftDemo6FlavorO","target":"s:9SwiftDemo6FlavorO","sourceOrigin":{"identifier":"s:SYsSHRzSH8RawValueSYRpzrlE4hash4intoys6HasherVz_tF","displayName":"RawRepresentable.hash(into:)"}},{"kind":"memberOf","source":"s:SQsRi_zRi0_zrlE2neoiySbx_xtFZ::SYNTHESIZED::s:9SwiftDemo6FlavorO","target":"s:9SwiftDemo6FlavorO","sourceOrigin":{"identifier":"s:SQsRi_zRi0_zrlE2neoiySbx_xtFZ","displayName":"Equatable.!=(_:_:)"}},{"kind":"conformsTo","source":"s:9SwiftDemo6FlavorO","target":"s:SQ","targetFallback":"Swift.Equatable"},{"kind":"conformsTo","source":"s:9SwiftDemo6FlavorO","target":"s:SH","targetFallback":"Swift.Hashable"},{"kind":"conformsTo","source":"s:9SwiftDemo6FlavorO","target":"s:SY","targetFallback":"Swift.RawRepresentable"},{"kind":"conformsTo","source":"s:9SwiftDemo6FlavorO","target":"s:s23CustomStringConvertibleP","targetFallback":"Swift.CustomStringConvertible"},{"kind":"memberOf","source":"s:9SwiftDemo6FlavorO7vanillayA2CmF","target":"s:9SwiftDemo6FlavorO"},{"kind":"memberOf","source":"s:9SwiftDemo6FlavorO9chocolateyA2CmF","target":"s:9SwiftDemo6FlavorO"},{"kind":"memberOf","source":"s:9SwiftDemo6FlavorO8rawValueACSgSi_tcfc","target":"s:9SwiftDemo6FlavorO","sourceOrigin":{"identifier":"s:SY8rawValuexSg03RawB0Qz_tcfc","displayName":"RawRepresentable.init(rawValue:)"}},{"kind":"memberOf","source":"s:9SwiftDemo0B0C5greet4name5timesS2S_SitF","target":"s:9SwiftDemo0B0C"},{"kind":"memberOf","source":"s:9SwiftDemo0B0C7versionSSvpZ","target":"s:9SwiftDemo0B0C"},{"kind":"conformsTo","source":"s:9SwiftDemo5PointV","target":"s:s9EscapableP","targetFallback":"Swift.Escapable"},{"kind":"conformsTo","source":"s:9SwiftDemo5PointV","target":"s:s8CopyableP","targetFallback":"Swift.Copyable"},{"kind":"memberOf","source":"s:9SwiftDemo5PointV11descriptionSSvp","target":"s:9SwiftDemo5PointV","sourceOrigin":{"identifier":"s:s23CustomStringConvertibleP11descriptionSSvp","displayName":"CustomStringConvertible.description"}},{"kind":"memberOf","source":"s:9SwiftDemo5PointV6lengthSdvp","target":"s:9SwiftDemo5PointV"},{"kind":"conformsTo","source":"s:9SwiftDemo6FlavorO","target":"s:s9EscapableP","targetFallback":"Swift.Escapable"},{"kind":"conformsTo","source":"s:9SwiftDemo6FlavorO","target":"s:s8CopyableP","targetFallback":"Swift.Copyable"},{"kind":"memberOf","source":"s:9SwiftDemo6FlavorO11descriptionSSvp","target":"s:9SwiftDemo6FlavorO","sourceOrigin":{"identifier":"s:s23CustomStringConvertibleP11descriptionSSvp","displayName":"CustomStringConvertible.description"}},{"kind":"conformsTo","source":"s:9SwiftDemo5ShapeP","target":"s:9SwiftDemo7GreeterP"},{"kind":"requirementOf","source":"s:9SwiftDemo5ShapeP4areaSdvp","target":"s:9SwiftDemo5ShapeP"},{"kind":"requirementOf","source":"s:9SwiftDemo5ShapeP5sidesSivpZ","target":"s:9SwiftDemo5ShapeP"},{"kind":"memberOf","source":"s:9SwiftDemo7PolygonC4nameSSvp","target":"s:9SwiftDemo7PolygonC"},{"kind":"memberOf","source":"s:9SwiftDemo7PolygonC11vertexCountSivp","target":"s:9SwiftDemo7PolygonC"},{"kind":"memberOf","source":"s:9SwiftDemo7PolygonC6sharedACvpZ","target":"s:9SwiftDemo7PolygonC"},{"kind":"memberOf","source":"s:9SwiftDemo7PolygonC4name11vertexCountACSS_Sitcfc","target":"s:9SwiftDemo7PolygonC"},{"kind":"memberOf","source":"s:9SwiftDemo7PolygonC4nameACSgSS_tcfc","target":"s:9SwiftDemo7PolygonC"},{"kind":"memberOf","source":"s:9SwiftDemo7PolygonC5scale2byySd_tF","target":"s:9SwiftDemo7PolygonC"},{"kind":"memberOf","source":"s:9SwiftDemo7PolygonC5scale2byySi_tF","target":"s:9SwiftDemo7PolygonC"},{"kind":"memberOf","source":"s:9SwiftDemo7PolygonC5scale1x1yySd_SdtF","target":"s:9SwiftDemo7PolygonC"},{"kind":"memberOf","source":"s:9SwiftDemo7PolygonC4makeACyFZ","target":"s:9SwiftDemo7PolygonC"},{"kind":"memberOf","source":"s:9SwiftDemo7PolygonC8describeySSACSgFZ","target":"s:9SwiftDemo7PolygonC"},{"kind":"memberOf","source":"s:9SwiftDemo7PolygonCyAA5PointVSicip","target":"s:9SwiftDemo7PolygonC"},{"kind":"conformsTo","source":"s:9SwiftDemo6SquareC","target":"s:9SwiftDemo5ShapeP"},{"kind":"conformsTo","source":"s:9SwiftDemo6SquareC","target":"s:9SwiftDemo7GreeterP"},{"kind":"inheritsFrom","source":"s:9SwiftDemo6SquareC","target":"s:9SwiftDemo7PolygonC"},{"kind":"memberOf","source":"s:9SwiftDemo6SquareC4sideSdvp","target":"s:9SwiftDemo6SquareC"},{"kind":"memberOf","source":"s:9SwiftDemo6SquareC4sideACSd_tcfc","target":"s:9SwiftDemo6SquareC"},{"kind":"memberOf","source":"s:9SwiftDemo6SquareC4areaSdvp","target":"s:9SwiftDemo6SquareC","sourceOrigin":{"identifier":"s:9SwiftDemo5ShapeP4areaSdvp","displayName":"Shape.area"}},{"kind":"memberOf","source":"s:9SwiftDemo6SquareC5sidesSivpZ","target":"s:9SwiftDemo6SquareC","sourceOrigin":{"identifier":"s:9SwiftDemo5ShapeP5sidesSivpZ","displayName":"Shape.sides"}},{"kind":"memberOf","source":"s:9SwiftDemo6SquareC5greet4nameS2S_tF","target":"s:9SwiftDemo6SquareC","sourceOrigin":{"identifier":"s:9SwiftDemo7GreeterP5greet4nameS2S_tF","displayName":"Greeter.greet(name:)"}},{"kind":"memberOf","source":"s:9SwiftDemo6SquareC5scale2byySd_tF","target":"s:9SwiftDemo6SquareC"},{"kind":"overrides","source":"s:9SwiftDemo6SquareC5scale2byySd_tF","target":"s:9SwiftDemo7PolygonC5scale2byySd_tF"},{"kind":"memberOf","source":"s:SYsSHRzSH8RawValueSYRpzrlE04hashB0Sivp::SYNTHESIZED::s:9SwiftDemo13PrecipitationO","target":"s:9SwiftDemo13PrecipitationO","sourceOrigin":{"identifier":"s:SYsSHRzSH8RawValueSYRpzrlE04hashB0Sivp","displayName":"RawRepresentable.hashValue"}},{"kind":"memberOf","source":"s:SYsSHRzSH8RawValueSYRpzrlE4hash4intoys6HasherVz_tF::SYNTHESIZED::s:9SwiftDemo13PrecipitationO","target":"s:9SwiftDemo13PrecipitationO","sourceOrigin":{"identifier":"s:SYsSHRzSH8RawValueSYRpzrlE4hash4intoys6HasherVz_tF","displayName":"RawRepresentable.hash(into:)"}},{"kind":"memberOf","source":"s:SQsRi_zRi0_zrlE2neoiySbx_xtFZ::SYNTHESIZED::s:9SwiftDemo13PrecipitationO","target":"s:9SwiftDemo13PrecipitationO","sourceOrigin":{"identifier":"s:SQsRi_zRi0_zrlE2neoiySbx_xtFZ","displayName":"Equatable.!=(_:_:)"}},{"kind":"conformsTo","source":"s:9SwiftDemo13PrecipitationO","target":"s:SQ","targetFallback":"Swift.Equatable"},{"kind":"conformsTo","source":"s:9SwiftDemo13PrecipitationO","target":"s:SH","targetFallback":"Swift.Hashable"},{"kind":"conformsTo","source":"s:9SwiftDemo13PrecipitationO","target":"s:SY","targetFallback":"Swift.RawRepresentable"},{"kind":"memberOf","source":"s:9SwiftDemo13PrecipitationO4rainyA2CmF","target":"s:9SwiftDemo13PrecipitationO"},{"kind":"memberOf","source":"s:9SwiftDemo13PrecipitationO4snowyA2CmF","target":"s:9SwiftDemo13PrecipitationO"},{"kind":"memberOf","source":"s:9SwiftDemo13PrecipitationO4noneyA2CmF","target":"s:9SwiftDemo13PrecipitationO"},{"kind":"memberOf","source":"s:9SwiftDemo13PrecipitationO8rawValueACSgSS_tcfc","target":"s:9SwiftDemo13PrecipitationO","sourceOrigin":{"identifier":"s:SY8rawValuexSg03RawB0Qz_tcfc","displayName":"RawRepresentable.init(rawValue:)"}},{"kind":"memberOf","source":"s:s5ErrorP10FoundationE20localizedDescriptionSSvp::SYNTHESIZED::s:9SwiftDemo10ShapeErrorO","target":"s:9SwiftDemo10ShapeErrorO","sourceOrigin":{"identifier":"s:s5ErrorP10FoundationE20localizedDescriptionSSvp","displayName":"Error.localizedDescription"}},{"kind":"conformsTo","source":"s:9SwiftDemo10ShapeErrorO","target":"s:s5ErrorP","targetFallback":"Swift.Error"},{"kind":"conformsTo","source":"s:9SwiftDemo10ShapeErrorO","target":"s:s8SendableP","targetFallback":"Swift.Sendable"},{"kind":"conformsTo","source":"s:9SwiftDemo10ShapeErrorO","target":"s:s16SendableMetatypeP","targetFallback":"Swift.SendableMetatype"},{"kind":"memberOf","source":"s:9SwiftDemo10ShapeErrorO11invalidSideyACSdcACmF","target":"s:9SwiftDemo10ShapeErrorO"},{"kind":"memberOf","source":"s:9SwiftDemo10ShapeErrorO12tooManySidesyACSi_SitcACmF","target":"s:9SwiftDemo10ShapeErrorO"},{"kind":"memberOf","source":"s:9SwiftDemo10ShapeErrorO7unknownyA2CmF","target":"s:9SwiftDemo10ShapeErrorO"},{"kind":"memberOf","source":"s:9SwiftDemo11MeasurementO6lengthyACSdcACmF","target":"s:9SwiftDemo11MeasurementO"},{"kind":"memberOf","source":"s:9SwiftDemo11MeasurementO4areayACSd_SdtcACmF","target":"s:9SwiftDemo11MeasurementO"},{"kind":"memberOf","source":"s:9SwiftDemo11MeasurementO4noneyA2CmF","target":"s:9SwiftDemo11MeasurementO"},{"kind":"memberOf","source":"s:9SwiftDemo11MeasurementO4UnitV","target":"s:9SwiftDemo11MeasurementO"},{"kind":"memberOf","source":"s:9SwiftDemo11MeasurementO4UnitV6symbolSSvp","target":"s:9SwiftDemo11MeasurementO4UnitV"},{"kind":"memberOf","source":"s:9SwiftDemo11MeasurementO4UnitV6symbolAESS_tcfc","target":"s:9SwiftDemo11MeasurementO4UnitV"},{"kind":"memberOf","source":"s:9SwiftDemo11MeasurementO6isNoneSbvp","target":"s:9SwiftDemo11MeasurementO"},{"kind":"memberOf","source":"s:9SwiftDemo4RingV5innerAA5PointVvp","target":"s:9SwiftDemo4RingV"},{"kind":"memberOf","source":"s:9SwiftDemo4RingV5outerAA5PointVvp","target":"s:9SwiftDemo4RingV"},{"kind":"memberOf","source":"s:9SwiftDemo4RingV5inner5outerAcA5PointV_AGtcfc","target":"s:9SwiftDemo4RingV"},{"kind":"memberOf","source":"s:9SwiftDemo4RingV6expand2byySd_tF","target":"s:9SwiftDemo4RingV"},{"kind":"memberOf","source":"s:9SwiftDemo4RingV1poiyA2C_ACtFZ","target":"s:9SwiftDemo4RingV"},{"kind":"memberOf","source":"s:ScA12_ConcurrencyE18withSerialExecutoryqd__qd__Scf_pqd_0_YKXEqd_0_YKs5ErrorRd_0_Ri_d__r0_lF::SYNTHESIZED::s:9SwiftDemo7CounterC","target":"s:9SwiftDemo7CounterC","sourceOrigin":{"identifier":"s:ScA12_ConcurrencyE18withSerialExecutoryqd__qd__Scf_pqd_0_YKXEqd_0_YKs5ErrorRd_0_Ri_d__r0_lF","displayName":"Actor.withSerialExecutor(_:)"}},{"kind":"memberOf","source":"s:ScA12_ConcurrencyE18withSerialExecutoryqd__qd__Scf_pYaqd_0_YKYCXEYaqd_0_YKs5ErrorRd_0_Ri_d__r0_lF::SYNTHESIZED::s:9SwiftDemo7CounterC","target":"s:9SwiftDemo7CounterC","sourceOrigin":{"identifier":"s:ScA12_ConcurrencyE18withSerialExecutoryqd__qd__Scf_pYaqd_0_YKYCXEYaqd_0_YKs5ErrorRd_0_Ri_d__r0_lF","displayName":"Actor.withSerialExecutor(_:)"}},{"kind":"memberOf","source":"s:ScA12_ConcurrencyE20preconditionIsolated_4file4lineySSyXK_s12StaticStringVSutF::SYNTHESIZED::s:9SwiftDemo7CounterC","target":"s:9SwiftDemo7CounterC","sourceOrigin":{"identifier":"s:ScA12_ConcurrencyE20preconditionIsolated_4file4lineySSyXK_s12StaticStringVSutF","displayName":"Actor.preconditionIsolated(_:file:line:)"}},{"kind":"memberOf","source":"s:ScA12_ConcurrencyE14assertIsolated_4file4lineySSyXK_s12StaticStringVSutF::SYNTHESIZED::s:9SwiftDemo7CounterC","target":"s:9SwiftDemo7CounterC","sourceOrigin":{"identifier":"s:ScA12_ConcurrencyE14assertIsolated_4file4lineySSyXK_s12StaticStringVSutF","displayName":"Actor.assertIsolated(_:file:line:)"}},{"kind":"memberOf","source":"s:ScA12_ConcurrencyE14assumeIsolated_4file4lineqd__qd__xYiKXE_s12StaticStringVSutKs8SendableRd__lF::SYNTHESIZED::s:9SwiftDemo7CounterC","target":"s:9SwiftDemo7CounterC","sourceOrigin":{"identifier":"s:ScA12_ConcurrencyE14assumeIsolated_4file4lineqd__qd__xYiKXE_s12StaticStringVSutKs8SendableRd__lF","displayName":"Actor.assumeIsolated(_:file:line:)"}},{"kind":"conformsTo","source":"s:9SwiftDemo7CounterC","target":"s:ScA","targetFallback":"_Concurrency.Actor"},{"kind":"conformsTo","source":"s:9SwiftDemo7CounterC","target":"s:s8SendableP","targetFallback":"Swift.Sendable"},{"kind":"conformsTo","source":"s:9SwiftDemo7CounterC","target":"s:s16SendableMetatypeP","targetFallback":"Swift.SendableMetatype"},{"kind":"memberOf","source":"s:9SwiftDemo7CounterC5valueSivp","target":"s:9SwiftDemo7CounterC"},{"kind":"memberOf","source":"s:9SwiftDemo7CounterCACycfc","target":"s:9SwiftDemo7CounterC"},{"kind":"memberOf","source":"s:9SwiftDemo7CounterC9incrementSiyF","target":"s:9SwiftDemo7CounterC"},{"kind":"memberOf","source":"s:9SwiftDemo7CounterC5labelSSyF","target":"s:9SwiftDemo7CounterC"},{"kind":"conformsTo","source":"s:9SwiftDemo6CanvasC","target":"s:s8SendableP","targetFallback":"Swift.Sendable"},{"kind":"memberOf","source":"s:9SwiftDemo6CanvasCACycfc","target":"s:9SwiftDemo6CanvasC"},{"kind":"memberOf","source":"s:9SwiftDemo6CanvasC4drawyyAA5Shape_pF","target":"s:9SwiftDemo6CanvasC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderCACycfc","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC4load4path10Foundation4DataVSS_tKF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC5fetch3urlSS10Foundation3URLV_tYaKF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC4wait7secondsySd_tYaF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC9transformyxxAA5ShapeRzlF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC5first2ofxSgSayxG_tlF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC14withCompletionyyys6ResultOySSAA10ShapeErrorOGcF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC4eachyyySiXEF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC6lookup5table3keySiSgSDySSSiG_SStF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC6updateyyAA5PointVzF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC10modernOnlyyyF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC11legacyFetchyyF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo6LoaderC8oldFetchyyF","target":"s:9SwiftDemo6LoaderC"},{"kind":"memberOf","source":"s:9SwiftDemo7TrackerC9liveCountSivpZ","target":"s:9SwiftDemo7TrackerC"},{"kind":"memberOf","source":"s:9SwiftDemo7TrackerC2idSivp","target":"s:9SwiftDemo7TrackerC"},{"kind":"memberOf","source":"s:9SwiftDemo7TrackerC2idACSi_tcfc","target":"s:9SwiftDemo7TrackerC"},{"kind":"memberOf","source":"s:9SwiftDemo7TrackerC4sameACyF","target":"s:9SwiftDemo7TrackerC"}]}
\ No newline at end of file
diff --git a/metadata-generator/TestFixtures/SwiftDemo/symbolgraphs/SwiftDemo@Swift.symbols.json b/metadata-generator/TestFixtures/SwiftDemo/symbolgraphs/SwiftDemo@Swift.symbols.json
new file mode 100644
index 000000000..8ef8982db
--- /dev/null
+++ b/metadata-generator/TestFixtures/SwiftDemo/symbolgraphs/SwiftDemo@Swift.symbols.json
@@ -0,0 +1 @@
+{"metadata":{"formatVersion":{"major":0,"minor":6,"patch":0},"generator":"Apple Swift version 6.4 (swiftlang-6.4.0.34.1 clang-2100.3.34.1)"},"module":{"name":"SwiftDemo","platform":{"architecture":"arm64","environment":"simulator","vendor":"apple","operatingSystem":{"name":"ios","minimumVersion":{"major":15,"minor":0}}}},"symbols":[{"kind":{"identifier":"swift.property","displayName":"Instance Property"},"identifier":{"precise":"s:SS9SwiftDemoE7shoutedSSvp","interfaceLanguage":"swift"},"pathComponents":["String","shouted"],"names":{"title":"shouted","subHeading":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"shouted"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"}]},"swiftExtension":{"extendedModule":"Swift","typeKind":"swift.struct"},"declarationFragments":[{"kind":"keyword","spelling":"var"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"shouted"},{"kind":"text","spelling":": "},{"kind":"typeIdentifier","spelling":"String","preciseIdentifier":"s:SS"},{"kind":"text","spelling":" { "},{"kind":"keyword","spelling":"get"},{"kind":"text","spelling":" }"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Extensions.swift","position":{"line":18,"character":15}}},{"kind":{"identifier":"swift.method","displayName":"Instance Method"},"identifier":{"precise":"s:Sa9SwiftDemoAA5PointVRszlE8centroidACyF","interfaceLanguage":"swift"},"pathComponents":["Array","centroid()"],"names":{"title":"centroid()","subHeading":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"centroid"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}]},"functionSignature":{"returns":[{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}]},"swiftGenerics":{"parameters":[{"name":"Element","index":0,"depth":0}],"constraints":[{"kind":"sameType","lhs":"Element","rhs":"Point","rhsPrecise":"s:9SwiftDemo5PointV"}]},"swiftExtension":{"extendedModule":"Swift","typeKind":"swift.struct","constraints":[{"kind":"sameType","lhs":"Element","rhs":"Point","rhsPrecise":"s:9SwiftDemo5PointV"}]},"declarationFragments":[{"kind":"keyword","spelling":"func"},{"kind":"text","spelling":" "},{"kind":"identifier","spelling":"centroid"},{"kind":"text","spelling":"() -> "},{"kind":"typeIdentifier","spelling":"Point","preciseIdentifier":"s:9SwiftDemo5PointV"}],"accessLevel":"public","location":{"uri":"file://Sources/SwiftDemo/Extensions.swift","position":{"line":22,"character":16}}}],"relationships":[{"kind":"memberOf","source":"s:SS9SwiftDemoE7shoutedSSvp","target":"s:SS","targetFallback":"Swift.String"},{"kind":"memberOf","source":"s:Sa9SwiftDemoAA5PointVRszlE8centroidACyF","target":"s:Sa","targetFallback":"Swift.Array"}]}
\ No newline at end of file
diff --git a/metadata-generator/build-step-metadata-generator.py b/metadata-generator/build-step-metadata-generator.py
index 1acd946c9..cb1f0491f 100755
--- a/metadata-generator/build-step-metadata-generator.py
+++ b/metadata-generator/build-step-metadata-generator.py
@@ -114,6 +114,8 @@ def map_and_list(func, iterable):
.format(docset_platform))
yaml_output_folder = env_or_none("NS_DEBUG_METADATA_PATH") or env_or_none("TNS_DEBUG_METADATA_PATH")
strict_includes = env_or_none("NS_DEBUG_METADATA_STRICT_INCLUDES") or env_or_none("TNS_DEBUG_METADATA_STRICT_INCLUDES")
+swift_symbolgraph_dir = env_or_none("NS_SWIFT_SYMBOLGRAPH_DIR") or env_or_none("TNS_SWIFT_SYMBOLGRAPH_DIR")
+skip_objc = env_bool("NS_SKIP_OBJC_METADATA") or env_bool("TNS_SKIP_OBJC_METADATA")
def save_stream_to_file(filename, stream):
@@ -133,6 +135,12 @@ def generate_metadata(arch):
if strict_includes is not None:
generator_call.extend(["-strict-includes={}".format(strict_includes)])
+ # Swift-only mode or Swift supplement
+ if swift_symbolgraph_dir is not None and len(swift_symbolgraph_dir) > 0:
+ generator_call.extend(["--swift-symbolgraph-dir", swift_symbolgraph_dir])
+ if skip_objc:
+ generator_call.extend(["--skip-objc"])
+
# optionally add typescript output folder
if typescript_output_folder is not None:
current_typescript_output_folder = os.path.join(typescript_output_folder, arch)
diff --git a/metadata-generator/src/CMakeLists.txt b/metadata-generator/src/CMakeLists.txt
index 037abdc98..11f96abb4 100644
--- a/metadata-generator/src/CMakeLists.txt
+++ b/metadata-generator/src/CMakeLists.txt
@@ -35,6 +35,20 @@ set(GENERATOR_HEADERS
Utils/StringUtils.h
Yaml/MetaYamlTraits.h
Yaml/YamlSerializer.h
+
+ # Swift support
+ Swift/CapabilityClassifier.h
+ Swift/CoverageReport.h
+ Swift/FragmentTokens.h
+ Swift/ProbeEmitter.h
+ Swift/ProbeVerifier.h
+ Swift/SwiftSource.h
+ Swift/SwiftSurface.h
+ Swift/SwiftTypes.h
+ Swift/SwiftIR.h
+ Swift/SymbolGraphLoader.h
+ Swift/ThunkEmitter.h
+ TypeScript/SwiftDefinitionWriter.h
)
set(GENERATOR_SOURCES
@@ -63,6 +77,20 @@ set(GENERATOR_SOURCES
TypeScript/DocSetManager.cpp
Utils/fileStream.cpp
Utils/memoryStream.cpp
+
+ # Swift support
+ Swift/CapabilityClassifier.cpp
+ Swift/CoverageReport.cpp
+ Swift/FragmentTokens.cpp
+ Swift/ProbeEmitter.cpp
+ Swift/ProbeVerifier.cpp
+ Swift/SwiftSource.cpp
+ Swift/SwiftSurface.cpp
+ Swift/SwiftTypes.cpp
+ Swift/SwiftIR.cpp
+ Swift/SymbolGraphLoader.cpp
+ Swift/ThunkEmitter.cpp
+ TypeScript/SwiftDefinitionWriter.cpp
)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${LIBXML2_INCLUDE_DIR})
diff --git a/metadata-generator/src/Swift/CapabilityClassifier.cpp b/metadata-generator/src/Swift/CapabilityClassifier.cpp
new file mode 100644
index 000000000..4b8846c88
--- /dev/null
+++ b/metadata-generator/src/Swift/CapabilityClassifier.cpp
@@ -0,0 +1,550 @@
+#include "CapabilityClassifier.h"
+
+#include
+#include
+
+#include
+#include
+
+namespace Swift {
+
+const char* toString(Tier tier) {
+ switch (tier) {
+ case Tier::ObjCDirect:
+ return "objc-direct";
+ case Tier::SwiftGenerated:
+ return "swift-generated";
+ case Tier::SwiftSpecialized:
+ return "swift-specialized";
+ case Tier::TypeOnly:
+ return "type-only";
+ case Tier::Unsupported:
+ return "unsupported";
+ case Tier::NotApplicable:
+ return "not-applicable";
+ }
+ return "unsupported";
+}
+
+const Capability* Classification::find(const std::string& id) const {
+ auto it = bySymbol.find(id);
+ return it == bySymbol.end() ? nullptr : &it->second;
+}
+
+bool isCallableKind(SymbolKind kind) {
+ switch (kind) {
+ case SymbolKind::EnumCase:
+ case SymbolKind::Initializer:
+ case SymbolKind::InstanceMethod:
+ case SymbolKind::TypeMethod:
+ case SymbolKind::Operator:
+ case SymbolKind::InstanceProperty:
+ case SymbolKind::TypeProperty:
+ case SymbolKind::InstanceSubscript:
+ case SymbolKind::TypeSubscript:
+ case SymbolKind::Function:
+ case SymbolKind::Variable:
+ return true;
+ default:
+ return false;
+ }
+}
+
+namespace {
+
+std::string availabilityDomain(const Platform& platform) {
+ llvm::StringRef os = platform.operatingSystem;
+ if (os == "ios") {
+ return platform.environment == "macabi" ? "macCatalyst" : "iOS";
+ }
+ if (os == "macosx" || os == "macos") {
+ return "macOS";
+ }
+ if (os == "tvos") {
+ return "tvOS";
+ }
+ if (os == "watchos") {
+ return "watchOS";
+ }
+ if (os == "xros" || os == "visionos") {
+ return "visionOS";
+ }
+ return os.str();
+}
+
+bool versionAtMost(const Version& a, const Version& b) {
+ return std::tie(a.major, a.minor, a.patch) <=
+ std::tie(b.major, b.minor, b.patch);
+}
+
+bool hasAttribute(const Symbol& symbol, llvm::StringRef attribute) {
+ for (const auto& candidate : symbol.attributes) {
+ if (llvm::StringRef(candidate).startswith(attribute)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+bool isPrimitive(const std::string& usr, Bridge& bridge) {
+ using namespace KnownTypes;
+ static const char* integers[] = {kInt, kInt8, kInt16, kInt32, kInt64,
+ kUInt, kUInt8, kUInt16, kUInt32, kUInt64};
+ for (const char* candidate : integers) {
+ if (usr == candidate) {
+ bridge = Bridge::Integer;
+ return true;
+ }
+ }
+ if (usr == kDouble || usr == kFloat || usr == kCGFloat) {
+ bridge = Bridge::Floating;
+ return true;
+ }
+ if (usr == kBool) {
+ bridge = Bridge::Bool;
+ return true;
+ }
+ if (usr == kString) {
+ bridge = Bridge::String;
+ return true;
+ }
+ return false;
+}
+
+class Classifier {
+ public:
+ Classifier(const Module& module,
+ const std::map& rejections)
+ : _module(module), _rejections(rejections) {}
+
+ Classification run() {
+ // Types first: member classification depends on the owner's tier.
+ for (const auto& entry : _module.symbols) {
+ if (isNominalType(entry.second.kind)) {
+ _result.bySymbol[entry.first] = classifyType(entry.second);
+ }
+ }
+ for (const auto& entry : _module.symbols) {
+ if (!isNominalType(entry.second.kind)) {
+ _result.bySymbol[entry.first] = classifyOther(entry.second);
+ }
+ }
+ resolveNames();
+ return std::move(_result);
+ }
+
+ private:
+ static Capability make(Tier tier, std::string reason = "") {
+ Capability capability;
+ capability.tier = tier;
+ if (!reason.empty()) {
+ capability.reasons.push_back(std::move(reason));
+ }
+ return capability;
+ }
+
+ // Reasons shared by every declaration kind.
+ bool commonRejection(const Symbol& symbol, Capability& out) const {
+ auto rejected = _rejections.find(symbol.preciseId);
+ if (rejected != _rejections.end()) {
+ out = make(Tier::Unsupported, "compiler-rejected:" + rejected->second);
+ return true;
+ }
+ if (llvm::StringRef(symbol.usr).startswith("c:")) {
+ out = make(Tier::ObjCDirect, "objc-visible");
+ return true;
+ }
+ if (symbol.access != AccessLevel::Public &&
+ symbol.access != AccessLevel::Open) {
+ out = make(Tier::Unsupported, "not-public");
+ return true;
+ }
+ for (const Availability* availability :
+ applicableAvailability(_module, symbol)) {
+ if (availability->isUnconditionallyUnavailable) {
+ out = make(Tier::Unsupported, "unavailable");
+ return true;
+ }
+ if (availability->obsoleted && _module.platform.minimumVersion &&
+ versionAtMost(*availability->obsoleted,
+ *_module.platform.minimumVersion)) {
+ out = make(Tier::Unsupported, "obsoleted");
+ return true;
+ }
+ }
+ return false;
+ }
+
+ Capability classifyType(const Symbol& symbol) const {
+ Capability capability;
+ if (commonRejection(symbol, capability)) {
+ return capability;
+ }
+ if (symbol.kind == SymbolKind::Protocol) {
+ return make(Tier::TypeOnly, "protocol");
+ }
+ if (!symbol.genericParameters.empty()) {
+ return make(Tier::SwiftSpecialized, "generic");
+ }
+ if (!symbol.parentId.empty()) {
+ return make(Tier::Unsupported, "nested-type");
+ }
+ // Graphs show suppressed conformances only when the declaration spells
+ // them; other noncopyable types are caught by compiler verification.
+ if (llvm::StringRef(symbol.declarationText).contains("~Copyable")) {
+ return make(Tier::Unsupported, "noncopyable");
+ }
+ if (llvm::StringRef(symbol.declarationText).contains("~Escapable")) {
+ return make(Tier::Unsupported, "nonescapable");
+ }
+ if (symbol.kind == SymbolKind::Enum) {
+ for (const auto& id : symbol.memberIds) {
+ const Symbol* member = _module.find(id);
+ if (member && member->kind == SymbolKind::EnumCase &&
+ !member->parameters.empty()) {
+ return make(Tier::Unsupported, "enum-associated-values");
+ }
+ }
+ }
+ return make(Tier::SwiftGenerated);
+ }
+
+ Capability classifyOther(const Symbol& symbol) const {
+ Capability capability;
+ switch (symbol.kind) {
+ case SymbolKind::Deinitializer:
+ return make(Tier::NotApplicable, "deinitializer");
+ case SymbolKind::Macro:
+ return make(Tier::NotApplicable, "macro");
+ case SymbolKind::Extension:
+ return make(Tier::NotApplicable, "extension-block");
+ case SymbolKind::Unknown:
+ return make(Tier::Unsupported, "unknown-kind");
+ default:
+ break;
+ }
+ if (commonRejection(symbol, capability)) {
+ return capability;
+ }
+ if (symbol.kind == SymbolKind::TypeAlias) {
+ return make(Tier::TypeOnly, "type-alias");
+ }
+ if (symbol.kind == SymbolKind::AssociatedType) {
+ return make(Tier::TypeOnly, "associated-type");
+ }
+
+ const Symbol* owner =
+ symbol.parentId.empty() ? nullptr : _module.find(symbol.parentId);
+ bool isMemberKind = symbol.kind != SymbolKind::Function &&
+ symbol.kind != SymbolKind::Variable;
+ if (symbol.parentId.empty() && isMemberKind) {
+ // A member whose owner the graph omits (no memberOf edge).
+ return make(Tier::Unsupported, "missing-owner");
+ }
+ if (!symbol.parentId.empty()) {
+ if (!owner) {
+ return make(Tier::Unsupported, "external-type-extension");
+ }
+ if (owner->kind == SymbolKind::Protocol) {
+ return make(Tier::TypeOnly, "protocol-requirement");
+ }
+ const Capability* ownerCapability = _result.find(owner->preciseId);
+ if (!ownerCapability || ownerCapability->tier != Tier::SwiftGenerated) {
+ Tier tier =
+ ownerCapability && ownerCapability->tier == Tier::SwiftSpecialized
+ ? Tier::SwiftSpecialized
+ : Tier::Unsupported;
+ return make(tier, "owner-not-bridged");
+ }
+ }
+
+ if (symbol.kind == SymbolKind::Operator) {
+ return make(Tier::Unsupported, "operator");
+ }
+ if (symbol.kind == SymbolKind::InstanceSubscript ||
+ symbol.kind == SymbolKind::TypeSubscript) {
+ return make(Tier::Unsupported, "subscript");
+ }
+ if (symbol.kind == SymbolKind::EnumCase) {
+ // Only payload-less enums are bridged (see classifyType).
+ capability = make(Tier::SwiftGenerated);
+ capability.jsName = symbol.baseName;
+ return capability;
+ }
+
+ if (!symbol.genericParameters.empty()) {
+ return make(Tier::SwiftSpecialized, "generic");
+ }
+
+ bool nonisolated = hasAttribute(symbol, "nonisolated");
+ if (!nonisolated && (hasAttribute(symbol, "@MainActor") ||
+ (owner && hasAttribute(*owner, "@MainActor")))) {
+ return make(Tier::Unsupported, "main-actor");
+ }
+ if (owner && owner->kind == SymbolKind::Actor && !nonisolated &&
+ !symbol.isStatic && symbol.kind != SymbolKind::Initializer) {
+ return make(Tier::Unsupported, "actor-isolated");
+ }
+ if (symbol.isAsync) {
+ return make(Tier::Unsupported, "async");
+ }
+
+ std::set generics = genericNamesInScope(_module, symbol);
+ std::vector reasons;
+ for (const auto& parameter : symbol.parameters) {
+ if (parameter.modifier == "inout") {
+ reasons.push_back("inout-parameter");
+ continue;
+ }
+ if (parameter.isVariadic) {
+ reasons.push_back("variadic-parameter");
+ continue;
+ }
+ if (std::find(parameter.attributes.begin(), parameter.attributes.end(),
+ "@autoclosure") != parameter.attributes.end()) {
+ reasons.push_back("closure");
+ continue;
+ }
+ BridgedType bridged = bridge(parameter.type, generics, reasons);
+ capability.parameters.push_back(std::move(bridged));
+ }
+
+ if (symbol.kind == SymbolKind::Initializer) {
+ // Initializers produce the owner; failable ones may produce nil.
+ BridgedType self = bridgeOwner(*owner);
+ self.optional = symbol.isFailable;
+ capability.result = std::move(self);
+ } else if (symbol.valueType) {
+ capability.result = bridge(*symbol.valueType, generics, reasons);
+ } else if (symbol.returnType) {
+ capability.result = bridge(*symbol.returnType, generics, reasons);
+ } else {
+ capability.result.bridge = Bridge::Void;
+ }
+
+ std::sort(reasons.begin(), reasons.end());
+ reasons.erase(std::unique(reasons.begin(), reasons.end()), reasons.end());
+ if (!reasons.empty()) {
+ bool onlyGeneric =
+ std::all_of(reasons.begin(), reasons.end(),
+ [](const std::string& r) { return r == "generic"; });
+ return Capability{
+ onlyGeneric ? Tier::SwiftSpecialized : Tier::Unsupported,
+ reasons,
+ "",
+ false,
+ {},
+ {}};
+ }
+
+ capability.tier = Tier::SwiftGenerated;
+ capability.jsName = symbol.kind == SymbolKind::Initializer
+ ? "constructor"
+ : symbol.baseName;
+ return capability;
+ }
+
+ BridgedType bridgeOwner(const Symbol& owner) const {
+ BridgedType bridged;
+ bridged.symbolId = owner.preciseId;
+ bridged.bridge = owner.kind == SymbolKind::Struct ? Bridge::StructBox
+ : owner.kind == SymbolKind::Enum ? Bridge::EnumCase
+ : Bridge::ClassHandle;
+ TypeNode::Component component;
+ component.name = owner.name;
+ component.usr = owner.preciseId;
+ bridged.node.kind = TypeNode::Kind::Nominal;
+ bridged.node.components.push_back(std::move(component));
+ return bridged;
+ }
+
+ BridgedType bridge(const TypeRef& type, const std::set& generics,
+ std::vector& reasons) const {
+ bool complete = true;
+ BridgedType bridged;
+ bridged.node = parseType(type, generics, &complete);
+ if (!complete) {
+ reasons.push_back("unparsed-type");
+ return bridged;
+ }
+ const TypeNode* node = &bridged.node;
+ if (node->kind == TypeNode::Kind::Optional ||
+ node->kind == TypeNode::Kind::ImplicitlyUnwrappedOptional) {
+ bridged.optional = true;
+ node = &node->children[0];
+ if (node->kind == TypeNode::Kind::Optional ||
+ node->kind == TypeNode::Kind::ImplicitlyUnwrappedOptional) {
+ reasons.push_back("nested-optional");
+ return bridged;
+ }
+ }
+ std::string reason = bridgeNonOptional(*node, bridged);
+ if (!reason.empty()) {
+ reasons.push_back(reason);
+ }
+ return bridged;
+ }
+
+ // Returns the rejection reason, or "" with `bridged` filled in.
+ std::string bridgeNonOptional(const TypeNode& node,
+ BridgedType& bridged) const {
+ switch (node.kind) {
+ case TypeNode::Kind::Void:
+ bridged.bridge = Bridge::Void;
+ return "";
+ case TypeNode::Kind::GenericParameter:
+ return "generic";
+ case TypeNode::Kind::Function:
+ return "closure";
+ case TypeNode::Kind::Tuple:
+ return "tuple";
+ case TypeNode::Kind::Array:
+ case TypeNode::Kind::Dictionary:
+ return "collection";
+ case TypeNode::Kind::Existential:
+ case TypeNode::Kind::Composition:
+ return "existential";
+ case TypeNode::Kind::Opaque:
+ return "opaque-type";
+ case TypeNode::Kind::Metatype:
+ return "metatype";
+ case TypeNode::Kind::Unknown:
+ return "unparsed-type";
+ case TypeNode::Kind::Optional:
+ case TypeNode::Kind::ImplicitlyUnwrappedOptional:
+ return "nested-optional";
+ case TypeNode::Kind::Nominal:
+ break;
+ }
+
+ const std::string& usr = node.usr();
+ if (node.components.size() == 1 && node.components[0].arguments.empty() &&
+ isPrimitive(usr, bridged.bridge)) {
+ return "";
+ }
+ const Symbol* target = usr.empty() ? nullptr : _module.find(usr);
+ if (target) {
+ const Capability* capability = _result.find(target->preciseId);
+ if (capability && capability->tier == Tier::SwiftGenerated &&
+ target->kind != SymbolKind::Protocol) {
+ bridged = BridgedType{bridgeOwner(*target).bridge, bridged.optional,
+ target->preciseId, bridged.node};
+ return "";
+ }
+ return "unbridged-type:" + llvm::join(target->pathComponents, ".");
+ }
+ auto name = _module.externalNames.find(usr);
+ if (name != _module.externalNames.end()) {
+ return "unbridged-type:" + name->second;
+ }
+ std::string qualified = qualifiedNameFromUSR(usr);
+ return "unbridged-type:" + (qualified.empty() ? spelling(node) : qualified);
+ }
+
+ // JS names for SwiftGenerated members and overload ambiguity.
+ void resolveNames() {
+ struct Entry {
+ std::string id;
+ bool isProperty;
+ std::string signature;
+ };
+ std::map, std::vector>
+ groups;
+ for (auto& entry : _result.bySymbol) {
+ Capability& capability = entry.second;
+ if (capability.tier != Tier::SwiftGenerated ||
+ capability.jsName.empty()) {
+ continue;
+ }
+ const Symbol* symbol = _module.find(entry.first);
+ bool isProperty = symbol->kind == SymbolKind::InstanceProperty ||
+ symbol->kind == SymbolKind::TypeProperty ||
+ symbol->kind == SymbolKind::Variable ||
+ symbol->kind == SymbolKind::EnumCase;
+ bool isStatic = symbol->isStatic ||
+ symbol->kind == SymbolKind::EnumCase ||
+ symbol->kind == SymbolKind::Initializer;
+ std::string signature = std::to_string(capability.parameters.size());
+ for (const auto& parameter : capability.parameters) {
+ signature += "," + jsKind(parameter);
+ }
+ groups[{symbol->parentId, capability.jsName, isStatic}].push_back(
+ Entry{entry.first, isProperty, signature});
+ }
+
+ for (auto& group : groups) {
+ auto& entries = group.second;
+ bool hasProperty =
+ std::any_of(entries.begin(), entries.end(),
+ [](const Entry& e) { return e.isProperty; });
+ for (const auto& entry : entries) {
+ Capability& capability = _result.bySymbol[entry.id];
+ if (hasProperty && entries.size() > 1) {
+ // A JS property and method cannot share a key; the property wins.
+ if (!entry.isProperty) {
+ capability.tier = Tier::Unsupported;
+ capability.reasons = {"js-name-conflict"};
+ capability.jsName.clear();
+ capability.parameters.clear();
+ }
+ continue;
+ }
+ for (const auto& other : entries) {
+ if (&other != &entry && other.signature == entry.signature) {
+ capability.ambiguousOverload = true;
+ }
+ }
+ }
+ }
+ }
+
+ static std::string jsKind(const BridgedType& type) {
+ std::string kind;
+ switch (type.bridge) {
+ case Bridge::Bool:
+ kind = "boolean";
+ break;
+ case Bridge::Integer:
+ case Bridge::Floating:
+ kind = "number";
+ break;
+ case Bridge::String:
+ case Bridge::EnumCase:
+ kind = "string";
+ break;
+ case Bridge::ClassHandle:
+ case Bridge::StructBox:
+ kind = "object:" + type.symbolId;
+ break;
+ default:
+ kind = "other";
+ break;
+ }
+ return type.optional ? kind + "?" : kind;
+ }
+
+ const Module& _module;
+ const std::map& _rejections;
+ Classification _result;
+};
+
+} // namespace
+
+std::vector applicableAvailability(const Module& module,
+ const Symbol& symbol) {
+ std::string domain = availabilityDomain(module.platform);
+ std::vector result;
+ for (const auto& availability : symbol.availability) {
+ if (availability.domain == "*" || availability.domain == domain) {
+ result.push_back(&availability);
+ }
+ }
+ return result;
+}
+
+Classification classify(const Module& module,
+ const std::map& rejections) {
+ return Classifier(module, rejections).run();
+}
+
+} // namespace Swift
diff --git a/metadata-generator/src/Swift/CapabilityClassifier.h b/metadata-generator/src/Swift/CapabilityClassifier.h
new file mode 100644
index 000000000..db0bf8fdd
--- /dev/null
+++ b/metadata-generator/src/Swift/CapabilityClassifier.h
@@ -0,0 +1,104 @@
+#pragma once
+
+#include