Support @nullable(heap) for recursive types
@nullable(heap=true) marks a parcelable field to be held in a heap
allocated wrapper like unique_ptr<T> in C++ and Box<T> in Rust.
This enables recursive parcelable types like following:
parcelable Recursive {
@nullable(heap=true) Recursive r;
}
Note `r` is represented in Option<Box<Recursive>> in Rust because Box<T>
should hold a value always.
Bug: 188690695
Test: aidl_integration_test
Change-Id: Ic9b209da73c1395785c078aeecd34fda74e42e7d
diff --git a/aidl_language.h b/aidl_language.h
index c4a335e..d32ee24 100644
--- a/aidl_language.h
+++ b/aidl_language.h
@@ -334,6 +334,7 @@
}
}
bool IsNullable() const;
+ bool IsHeapNullable() const;
bool IsUtf8InCpp() const;
bool IsSensitiveData() const;
bool IsVintfStability() const;