# \#nested

**URL:** https://forums.swift.org/tag/nested/136.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [Un-nesting the happy path when catching errors](https://forums.swift.org/t/un-nesting-the-happy-path-when-catching-errors/84914)

<div class="topic-metadata">

**Author:** [@jeremyabannister](https://forums.swift.org/u/jeremyabannister)\
**Replies:** 9\
**Last updated:** [February 25, 2026, 10:04pm UTC](https://forums.swift.org/t/un-nesting-the-happy-path-when-catching-errors/84914 "2026-02-25T22:04:07Z")

</div>

The motivation for this idea is that it would be nice if the happy path didn't need to gain a level of indentation just because we want to do some error handling. A solution that occurs to me is the following: readFromD…

---

## [Swift Macro inheritance with nested class](https://forums.swift.org/t/swift-macro-inheritance-with-nested-class/76486)

<div class="topic-metadata">

**Author:** [@Tof](https://forums.swift.org/u/Tof)\
**Replies:** 2\
**Last updated:** [December 9, 2024, 6:21pm UTC](https://forums.swift.org/t/swift-macro-inheritance-with-nested-class/76486 "2024-12-09T18:21:46Z")

</div>

Hi, I'm trying to make a macro like this: class ParentClass { @MyMacro class NestedClass { } } When the macro expands I want to get this: class ParentClass { class NestedClass: Equatable, CustomStringC…

---

## [Can't find the headers for embedded Objective-C inside a Swift framework](https://forums.swift.org/t/cant-find-the-headers-for-embedded-objective-c-inside-a-swift-framework/73150)

<div class="topic-metadata">

**Author:** [@ibrahimdh2](https://forums.swift.org/u/ibrahimdh2)\
**Replies:** 0\
**Last updated:** [July 13, 2024, 10:57am UTC](https://forums.swift.org/t/cant-find-the-headers-for-embedded-objective-c-inside-a-swift-framework/73150 "2024-07-13T10:57:16Z")

</div>

Hi, I am trying to make a Swift framework that has an objective c framework embedded inside it. Later this swift framework will be added to another framework that in turn will be used in an app. However, I'm getting pro…

---

## [\[Pre-pitch\] Allow extension of nested members within extension of parent](https://forums.swift.org/t/pre-pitch-allow-extension-of-nested-members-within-extension-of-parent/65423)

<div class="topic-metadata">

**Author:** [@Sajjon](https://forums.swift.org/u/Sajjon)\
**Replies:** 12\
**Last updated:** [June 8, 2023, 8:44pm UTC](https://forums.swift.org/t/pre-pitch-allow-extension-of-nested-members-within-extension-of-parent/65423 "2023-06-08T20:44:13Z")

</div>

This is a tiny syntactic sugar pitch. Swift's ability to group code by use of extension is probably one of the best features of Swift and something Apple themselves use a lot, combined with Swift's ability to nest types…

---

## [Dependant binary package framework being incorrectly copied to a plugin's framework folder](https://forums.swift.org/t/dependant-binary-package-framework-being-incorrectly-copied-to-a-plugins-framework-folder/56168)

<div class="topic-metadata">

**Author:** [@gutley](https://forums.swift.org/u/gutley)\
**Replies:** 0\
**Last updated:** [March 23, 2022, 12:08pm UTC](https://forums.swift.org/t/dependant-binary-package-framework-being-incorrectly-copied-to-a-plugins-framework-folder/56168 "2022-03-23T12:08:44Z")

</div>

I have an SPM package that is dependant on a 3rd party binary package ("MSAL", "GitHub - AzureAD/microsoft-authentication-library-for-objc: Microsoft Authentication Library (MSAL) for iOS and macOS). The framework that …

---

## [How specify module for nested declaration?](https://forums.swift.org/t/how-specify-module-for-nested-declaration/45173)

<div class="topic-metadata">

**Author:** [@akuzminskyi](https://forums.swift.org/u/akuzminskyi)\
**Replies:** 1\
**Last updated:** [February 28, 2021, 8:12pm UTC](https://forums.swift.org/t/how-specify-module-for-nested-declaration/45173 "2021-02-28T20:12:55Z")

</div>

Hi, How is it possible to specify a module for nested declaration where the name declaration name already exists from another module? // module A extension UIImage { public enum Assets { public static var valueA:…

---

## [Nesting a type within an extension to a generic type requires indicating the "parent"'s generic type when used](https://forums.swift.org/t/nesting-a-type-within-an-extension-to-a-generic-type-requires-indicating-the-parent-s-generic-type-when-used/36582)

<div class="topic-metadata">

**Author:** [@deanharel](https://forums.swift.org/u/deanharel)\
**Replies:** 6\
**Last updated:** [May 19, 2020, 6:35pm UTC](https://forums.swift.org/t/nesting-a-type-within-an-extension-to-a-generic-type-requires-indicating-the-parent-s-generic-type-when-used/36582 "2020-05-19T18:35:23Z")

</div>

Hi, I've stumbled upon a (IMHO) weird behaviour of the Swift compiler, and would like the community's thoughts on it. Declaration Consider the following declaration, as part of modelling an analytics provider: public …

---

## [Extension nested struct compile error](https://forums.swift.org/t/extension-nested-struct-compile-error/19795)

<div class="topic-metadata">

**Author:** [@jackylcs86](https://forums.swift.org/u/jackylcs86)\
**Replies:** 2\
**Last updated:** [January 25, 2019, 4:23am UTC](https://forums.swift.org/t/extension-nested-struct-compile-error/19795 "2019-01-25T04:23:43Z")

</div>

===== Module.swift ===== struct Module { } ===== Numbers.swift ===== extension Module { class Numbers { static var aConstantDouble: Double { return 0.54 } } } extension Module.Numbers { // No issue s…

---

## [Nested classes](https://forums.swift.org/t/nested-classes/15727)

<div class="topic-metadata">

**Author:** [@Tof](https://forums.swift.org/u/Tof)\
**Replies:** 11\
**Last updated:** [September 4, 2018, 4:26pm UTC](https://forums.swift.org/t/nested-classes/15727 "2018-09-04T16:26:46Z")

</div>

Hi all, Here is a case that I would like to share with you I have a base class that contains other classes that contain other subclasses as the following pseudo code // File: Base.swift public class Base { public …
