--structured: test for no unstructured parcelables
Bug: 110758329
Test: runtests.sh
Change-Id: Ie6583515e3eb2c6753f9d67da776949ac69f747a
diff --git a/aidl.cpp b/aidl.cpp
index 1f804bc..a3a5328 100644
--- a/aidl.cpp
+++ b/aidl.cpp
@@ -685,7 +685,7 @@
if (options.IsStructured()) {
types->typenames_.IterateTypes([&](const AidlDefinedType& type) {
if (type.AsUnstructuredParcelable() != nullptr) {
- err = AidlError::BAD_TYPE;
+ err = AidlError::NOT_STRUCTURED;
LOG(ERROR) << type.GetCanonicalName()
<< " is not structured, but this is a structured interface.";
}