commit | 53fb424e045b274c2798e72a373f6eee5443b136 | [log] [tgz] |
---|---|---|
author | Jooyung Han <jooyung@google.com> | Thu Dec 17 16:03:49 2020 +0900 |
committer | Treehugger Robot <treehugger-gerrit@google.com> | Tue Dec 22 10:35:23 2020 +0000 |
tree | fd4cc6066a64d0b95f5c3bbe22808d24b3b01655 | |
parent | b06c563515c0e1fc229a912bb1e0e8bba77614cc [diff] |
union requires first member's default value Default constructor of union type should initialize with the first member. Java backend was failing with union types when their first member is of enum type because enum type in Java backend is primitive but with no default value. (To be specific, the generated default constructor was trying to init primitive type(enum) with "null"). Now union's first member should have a useful default value. - set explicit default value (e.g. int a = 3;) - @nullable annotated. So, when the first member of a union is an enum, it should have a default value. Or, it will fail with an error. Bug: 175834770 Test: aidl_unittests / aidl_integration_test Change-Id: I6a0acc25331927826a8e747e6ea703f34dccae94
Documentation for this project is currently maintained here:
https://source.android.com/devices/architecture/aidl/overview