Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4947

Struct constants yield No field named "" was found in struct of type "Nested"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 0.13.0
    • Fix Version/s: None
    • Component/s: Compiler (General)
    • Labels:
      None

      Description

      enum E {
        A = 1,
        B = 2,
        C = 3
      }
      
      struct Nested {
        1: i64 f1,
        2: required string f2,
        3: optional E f3 = E.B
      }
      
      union Union {
        1: string f1;
        2: string f2;
      }
      
      struct TestStruct {
        1: optional E f1 = E.A,
        2: required i64 f2 = 1,
        3: required string f3 = "f3",
        4: Nested f4 = { f1 : 24, f2 : "i am required", f3 : E.B }
        5: Union f5 = {f1:"one"}
        6: map<string, i64> f6 = { "hello": 42, "goodbye":24 },
        7: set<i64> f7 = [ 1, 2, 3, -4 ]
        8: list<string> f8 = ["bla","bla","bla"]
      }
      

       

      Leads to

      [FAILURE:test.thrift:23] No field named "" was found in struct of type "Nested"

      at 4:Nested and 5:Union

       

       

        Attachments

          Activity

            People

            • Assignee:
              jensg Jens Geyer
              Reporter:
              jensg Jens Geyer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: