# Link to a symbol in parent class

**URL:** <https://forums.swift.org/t/link-to-a-symbol-in-parent-class/78856>\
**Category:** Swift-DocC\
**Tags:** question\
**Created:** [March 26, 2025, 5:25pm UTC](https://forums.swift.org/t/link-to-a-symbol-in-parent-class/78856 "2025-03-26T17:25:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yo1995](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/yo1995/32/16740_2.png) [@yo1995](https://forums.swift.org/u/yo1995)\
**Post date:** [March 26, 2025, 5:25pm UTC](https://forums.swift.org/t/link-to-a-symbol-in-parent-class/78856/1 "2025-03-26T17:25:14Z")

</div>

Have a question regarding how DocC behaves in class inheritance. In the example I have some dummy classes: `Geometry`, `Feature`, and `SubFeature`. `SubFeature` inherits from `Feature`.

I want to reference `SubFeature.geometry` property in the API doc. However, it seems the ``SubFeature/geometry`` DocC symbol link doesn't resolve. Only the ``Feature/geometry`` link resolves. (in the real usecase I'm referencing to the `SubFeature` subclass from a different type's API doc.)

Is this expected that symbol link only resolves on base class, not subclasses? Thanks.

```swift
import Foundation

/// A dummy class that represents a geometry.
public class Geometry {
    let id = UUID()
}

/// A dummy class that represents a feature that has a geospatial ``Geometry``.
public class Feature {
    public let geometry = Geometry()
}

/// A dummy class that represents a sub feature. It should have access to the
/// geometry of its parent feature,
/// i.e., ``SubFeature/geometry`` (link doesn't work).
/// i.e., ``Feature/geometry`` (link works).
public class SubFeature: Feature {
    public let someMethod: () -> Void = {}
}

```

---

<div class="post-metadata">

**Author:** ![jack](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jack/32/20250_2.png) [@jack](https://forums.swift.org/u/jack)\
**Post date:** [March 29, 2025, 3:51am UTC](https://forums.swift.org/t/link-to-a-symbol-in-parent-class/78856/2 "2025-03-29T03:51:54Z")

</div>

You can't link to `SubFeature/geometry` because there's no `SubFeature`-specific `geometry` page. If `SubFeature` were to override the `geometry` property, then a `SubFeature/geometry` page would be created and the link would resolve.

It is interesting, however, to consider whether `SubFeature/geometry` could/should resolve using the inheritance chain...
