Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Nested enum doesn't work #45

Closed
dongyuan opened this issue Apr 19, 2016 · 2 comments
Closed

Nested enum doesn't work #45

dongyuan opened this issue Apr 19, 2016 · 2 comments

Comments

@dongyuan
Copy link

see below unit test used for the case.

 func testArrayOfEnum() {
        struct Test: Mappable {
            let nests: [Nested]
            init(map: Mapper) throws {
                try self.nests = map.from("nests")
            }
        }

        enum Nested:String {
            case SAMPLE1 = "SAMPLE1"
            case SAMPLE2 = "SAMPLE2"
        }

        let test = try! Test(map: Mapper(JSON: ["nests": ["SAMPLE1","SAMPLE2"]]))
        XCTAssertNil(test.nests)
    }

@keith
Copy link
Contributor

keith commented May 7, 2016

Sorry about not responding earlier, I saw this but then forgot to follow up.

See #34 for details about this case.

@keith
Copy link
Contributor

keith commented Jul 13, 2016

This is now implemented via #61 I'll be cutting a new release shortly.

Please open an issue if you have any problems with it!

@keith keith closed this as completed Jul 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants