facebookarchive / swift

An annotation-based Java library for creating Thrift serializable types and services.
Apache License 2.0
900 stars 297 forks source link

[swift-generator] ConstMap generates code for "ImmutableMap.builder()" without filling in type parameters for the builder instance #169

Closed andrewcox closed 6 years ago

SirWellington commented 10 years ago

Furthermore, I think even if it was filled in, the cast from a Map to the Structure would fail in a Class Cast Exception.

Example:

const  Base.TimeValue DEFAULT_TIME_LENGTH = {"amount" : 1, "timeLength" : Base.TimeLength.WEEK};

Produces

public static final com.company.thrift.swift.base.TimeValue DEFAULT_TIME_LENGTH = ImmutableMap.builder()
        .put("timeLength", Base.TimeLength.WEEK)
        .build();
    ;
ghost commented 9 years ago

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.