Structured Parcelables: int/string default values.
Initial two types for defaults.
Syntax is:
parcelable MyParcelable {
String name = "wicked";
int rest = 0;
}
Bug: 110758329
Test: runtests.sh
Change-Id: Ieadf503ccb9acedf6782c15964c2d4957549542d
diff --git a/aidl.cpp b/aidl.cpp
index f859b1d..d8cc4b8 100644
--- a/aidl.cpp
+++ b/aidl.cpp
@@ -171,6 +171,10 @@
TypeNamespace* types) {
int err = 0;
for (const auto& v : parcel->GetFields()) {
+ if (!v->CheckValid()) {
+ err = 1;
+ }
+
if (!types->MaybeAddContainerType(v->GetType())) {
err = 1; // return type is invalid
}