Kotlin: add an error if optional native types are encountered. As it happens there aren't any right now. If we need to support these we'll have to work on the JNI signature calculation to make it work (they'll be represented as boxed objects which will change the sigs). Bug: 429143542 Test: Manual Change-Id: Ifee25e060e1a530238d3e421b4fb8f68bf4e7087 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/250414 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
diff --git a/generator/templates/art/api_kotlin_types.kt b/generator/templates/art/api_kotlin_types.kt index 4b124d1..6290cee 100644 --- a/generator/templates/art/api_kotlin_types.kt +++ b/generator/templates/art/api_kotlin_types.kt
@@ -113,7 +113,7 @@ {{ unreachable_code('Unsupported native type: ' + type.name.get()) }} {%- endif -%} {%- if optional -%} - {%- set ns.type_name = ns.type_name + '?' -%} + {{ unreachable_code('Optional natives not supported: ' + type.name.get()) }} {%- endif -%} {{ ns.type_name }} {%- if ns.default_value not in [None, undefined] -%} {{ ' ' }}={{ ' ' }}