<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/private-properties-no-longer-break-the-memberwise-initializer-in-swift-6-4-5ekefyofb" -->

---
title: Private properties no longer break the memberwise...
description: SE-0502, shipping in Swift 6.4, changes how the synthesized memberwise initializer treats private stored properties. Previously, a single private property with...
canonical: https://daily.dev/posts/private-properties-no-longer-break-the-memberwise-initializer-in-swift-6-4-5ekefyofb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Private properties no longer break the memberwise initializer in Swift 6.4 | daily.dev
og:description: SE-0502, shipping in Swift 6.4, changes how the synthesized memberwise initializer treats private stored properties. Previously, a single private property with...
og:url: https://daily.dev/posts/private-properties-no-longer-break-the-memberwise-initializer-in-swift-6-4-5ekefyofb
og:image: https://api.daily.dev/og/posts/5EkefyOfB.png
og:image:alt: Private properties no longer break the memberwise initializer in Swift 6.4
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Private properties no longer break the memberwise initializer in Swift 6.4

**[Sarunw](https://daily.dev/sources/sarunw)** · [@sarunw](https://daily.dev/sarunw) · 6 min read · 0 upvotes · 0 comments

## Summary

SE-0502, shipping in Swift 6.4, changes how the synthesized memberwise initializer treats private stored properties. Previously, a single private property with an initial value would drag the whole initializer's access level down to private, making it unusable from outside the struct. Now such properties are excluded from the initializer instead, keeping it at the highest access level among the remaining properties (capped at internal). The rule requires both that a property be less accessible than the initializer's max access level and that it have an initial value; properties without initial values, or structs where every property is equally private, keep the old behavior. Swift 6.4 also synthesizes a compatibility overload with the old signature to avoid breaking existing same-file calls. The change particularly helps macros that expand to private backing properties, which previously broke memberwise initializers the way property wrappers used to before compiler-level special-casing.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://sarunw.com/posts/exclude-private-properties-from-memberwise-initializer>

## Questions this post answers

### Why does adding a private property to a Swift struct remove access to its memberwise initializer?

Before Swift 6.4, the synthesized memberwise initializer's access level could not be higher than the least accessible stored property it included, so a single private property made the entire initializer private and unusable outside the struct's declaration. SE-0502, shipping in Swift 6.4, fixes this by excluding less-accessible properties with initial values from the initializer instead of lowering its access level.

_Track Swift language changes like this one on daily.dev before they break your struct initializers._

### What are the exact conditions for a property to be excluded from Swift's synthesized memberwise initializer under SE-0502?

A property is excluded from the memberwise initializer when it is less accessible than the initializer's maximum access level (capped at internal) and it has an initial value, either an explicit default or an implicit one like nil for an optional. If a property lacks an initial value, or every property shares the same access level, it stays in the initializer under the old rules.

_Developers adopting Swift 6.4 features can reference precise rule breakdowns like this via daily.dev._

### How does Swift 6.4 avoid breaking existing code that calls the old memberwise initializer with private properties included?

Swift 6.4 synthesizes both the new initializer, which excludes less-accessible properties with initial values, and a compatibility overload matching the old signature and restricted access level, so same-file callers keep working. A future language mode may remove the compatibility overload, offering a warning and a fix-it that writes an explicit initializer instead.

_Keep up with Swift migration details like this compatibility overload via daily.dev before upgrading toolchains._

## Similar posts on daily.dev

- [Memberwise Initializer in Swift explained with Code Examples](https://daily.dev/posts/memberwise-initializer-in-swift-explained-with-code-examples-oywf9uwcf) · SwiftLee · 1 upvotes · 0 comments
- [How to declare a memberwise initializer in a Swift extension](https://daily.dev/posts/how-to-declare-a-memberwise-initializer-in-a-swift-extension-lz7tn36hh) · Sarunw · 0 upvotes · 0 comments
- [Embedded Swift Improvements Coming in Swift 6.4](https://daily.dev/posts/embedded-swift-improvements-coming-in-swift-6-4-p4nvenuuu) · Swift.org · 1 upvotes · 0 comments

---

Tags: [#swift](https://daily.dev/tags/swift)

[View this post on daily.dev](https://daily.dev/posts/private-properties-no-longer-break-the-memberwise-initializer-in-swift-6-4-5ekefyofb)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Private properties no longer break the memberwise initializer in Swift 6.4","url":"https://daily.dev/posts/private-properties-no-longer-break-the-memberwise-initializer-in-swift-6-4-5ekefyofb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/private-properties-no-longer-break-the-memberwise-initializer-in-swift-6-4-5ekefyofb"},"datePublished":"2026-08-27T10:47:04.708Z","dateModified":"2026-08-28T07:00:15.937Z","description":"SE-0502, shipping in Swift 6.4, changes how the synthesized memberwise initializer treats private stored properties. Previously, a single private property with...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c1eff835586d343c18dcd312b73b0920?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c1eff835586d343c18dcd312b73b0920?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Sarunw","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Sarun Wongpatcharapakorn","url":"https://daily.dev/sarunw","image":"https://avatars.githubusercontent.com/u/795368?v=4","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":20}},"commentCount":0,"discussionUrl":"https://daily.dev/posts/private-properties-no-longer-break-the-memberwise-initializer-in-swift-6-4-5ekefyofb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"swift","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sarunw","item":"https://daily.dev/sources/sarunw"},{"@type":"ListItem","position":3,"name":"Private properties no longer break the memberwise initializer in Swift 6.4"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/private-properties-no-longer-break-the-memberwise-initializer-in-swift-6-4-5ekefyofb#faq","mainEntity":[{"@type":"Question","name":"Why does adding a private property to a Swift struct remove access to its memberwise initializer?","acceptedAnswer":{"@type":"Answer","text":"Before Swift 6.4, the synthesized memberwise initializer's access level could not be higher than the least accessible stored property it included, so a single private property made the entire initializer private and unusable outside the struct's declaration. SE-0502, shipping in Swift 6.4, fixes this by excluding less-accessible properties with initial values from the initializer instead of lowering its access level. Track Swift language changes like this one on daily.dev before they break your struct initializers."}},{"@type":"Question","name":"What are the exact conditions for a property to be excluded from Swift's synthesized memberwise initializer under SE-0502?","acceptedAnswer":{"@type":"Answer","text":"A property is excluded from the memberwise initializer when it is less accessible than the initializer's maximum access level (capped at internal) and it has an initial value, either an explicit default or an implicit one like nil for an optional. If a property lacks an initial value, or every property shares the same access level, it stays in the initializer under the old rules. Developers adopting Swift 6.4 features can reference precise rule breakdowns like this via daily.dev."}},{"@type":"Question","name":"How does Swift 6.4 avoid breaking existing code that calls the old memberwise initializer with private properties included?","acceptedAnswer":{"@type":"Answer","text":"Swift 6.4 synthesizes both the new initializer, which excludes less-accessible properties with initial values, and a compatibility overload matching the old signature and restricted access level, so same-file callers keep working. A future language mode may remove the compatibility overload, offering a warning and a fix-it that writes an explicit initializer instead. Keep up with Swift migration details like this compatibility overload via daily.dev before upgrading toolchains."}}]}
```

