Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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.