# Nested struct inside another struct, not the same as standalone struct?

**URL:** <https://forums.swift.org/t/nested-struct-inside-another-struct-not-the-same-as-standalone-struct/32472>\
**Category:** Using Swift\
**Created:** [January 11, 2020, 7:18pm UTC](https://forums.swift.org/t/nested-struct-inside-another-struct-not-the-same-as-standalone-struct/32472 "2020-01-11T19:18:36Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![bzamayo](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bzamayo/32/764_2.png) [@bzamayo](https://forums.swift.org/u/bzamayo)\
**Post date:** [January 11, 2020, 8:13pm UTC](https://forums.swift.org/t/nested-struct-inside-another-struct-not-the-same-as-standalone-struct/32472/4 "2020-01-11T20:13:00Z")

</div>

You cannot declare static properties inside generic types. The language doesn't support it today. This is because the semantics aren't very clear, should `Structure<Int>` share the same static variables as `Structure<String>` or should they be distinct? You _probably_ should be able to do the former, but that hasn't been decided yet and behaviour and syntax are simply not designed. Hence, the compiler bans it outright.

This applies to nested or top level types, static properties inside generic types simply are not allowed anywhere. In your case, as `Foo` is generic on `content`, then any nested type inside `Foo` is also generic on `content` (this might be easier to grasp if you think about the fully-qualified type of `Holder` — it is `Foo<content>.Holder`).

---

_[View the full topic](https://forums.swift.org/t/nested-struct-inside-another-struct-not-the-same-as-standalone-struct/32472)._
