Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/broadwaylamb/codable-wmo-bug
A project that can be used to reproduce a Swift 4 bug that results in inability to deserialize an object that has a field of a `RawRepresentable` type while the `rawValue` of that type is accessed in a function that is never called.
https://github.com/broadwaylamb/codable-wmo-bug
Last synced: about 1 month ago
JSON representation
A project that can be used to reproduce a Swift 4 bug that results in inability to deserialize an object that has a field of a `RawRepresentable` type while the `rawValue` of that type is accessed in a function that is never called.
- Host: GitHub
- URL: https://github.com/broadwaylamb/codable-wmo-bug
- Owner: broadwaylamb
- Created: 2017-09-22T00:06:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-22T00:06:26.000Z (over 7 years ago)
- Last Synced: 2024-10-16T06:44:38.439Z (3 months ago)
- Language: Swift
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Codable-WMO-bug
This repository contains a project that can be used to reproduce a Swift 4 bug that results in inability to deserialize an object that has a field of a `RawRepresentable` type while the `rawValue` of that type is accessed in a function that is never called.
### Environment
```
Apple Swift version 4.0 (swiftlang-900.0.65 clang-900.0.37)
Target: x86_64-apple-macosx10.9
Xcode: 9.0 (9A235)
macOS: 10.12.6 (16G29)
```### How to reproduce
This repo contains an Xcode project with two almost identical schemes, but in one of them WMO is enabled, while in the other it's disabled. In order to reproduce the issue run the following commands in the Terminal:
```
xcodebuild clean test -scheme CodableWMOBug-O0
```
— The test should pass.```
xcodebuild clean test -scheme CodableWMOBug-WMO
```
— The test fails.