Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

"const map<EnumType, ?>" fails to parse #75

Closed
emilssolmanis opened this issue Jan 12, 2015 · 3 comments
Closed

"const map<EnumType, ?>" fails to parse #75

emilssolmanis opened this issue Jan 12, 2015 · 3 comments

Comments

@emilssolmanis
Copy link

The thrift def

enum Enum {
    A = 1
}

const map<Enum, string> ConstMap = {
  Enum.A: "hurr-durr"
}

fails to parse with

    def cast(self, data):
        dct = {}
        keys = data.keys()

        for key in keys:
>           dct[self[1].cast(key)] = self[2].cast(data[key])
E           AttributeError: 'str' object has no attribute 'cast'

../thriftpy/parser/model.py:141: AttributeError
@emilssolmanis emilssolmanis changed the title const map<EnumType, ?>" "const map<EnumType, ?>" fails to parse Jan 12, 2015
@hit9
Copy link
Contributor

hit9 commented Jan 13, 2015

Similar to issue #69.

@hit9 hit9 mentioned this issue Jan 19, 2015
@hit9
Copy link
Contributor

hit9 commented Jan 23, 2015

Will be fixed in #80

@hit9 hit9 mentioned this issue Jan 23, 2015
@hit9
Copy link
Contributor

hit9 commented Jan 24, 2015

Closed in #80

@hit9 hit9 closed this as completed Jan 24, 2015
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