Compile error in Release Build (Swift 4.0) #149

Closed
opened 2025-12-29 15:25:47 +01:00 by adam · 2 comments
Owner

Originally created by @athei on GitHub (Jun 11, 2017).

When compiling CoreStore Swift 4.0 branch as release build I get the following error:
CoreStore/Sources/DataStack.swift:44:80: Static let 'applicationName' is internal and cannot be referenced from a default argument value

This makes sense as with Swift 4.0 you cannot use variables of a more restricted visibility as default arguments. You need to wrap it with a public accessor. I don't know why this does not come up in a debug build.

Originally created by @athei on GitHub (Jun 11, 2017). When compiling CoreStore Swift 4.0 branch as release build I get the following error: `CoreStore/Sources/DataStack.swift:44:80: Static let 'applicationName' is internal and cannot be referenced from a default argument value` This makes sense as with Swift 4.0 you cannot use variables of a more restricted visibility as default arguments. You need to wrap it with a public accessor. I don't know why this does not come up in a debug build.
adam added the fixed label 2025-12-29 15:25:47 +01:00
adam closed this issue 2025-12-29 15:25:47 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Jun 12, 2017):

I missed that. Thanks for raising this

@JohnEstropia commented on GitHub (Jun 12, 2017): I missed that. Thanks for raising this
Author
Owner

@JohnEstropia commented on GitHub (Jun 12, 2017):

Fixed on the prototype/Swift_4_0 branch.

@JohnEstropia commented on GitHub (Jun 12, 2017): Fixed on the `prototype/Swift_4_0` branch.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#149