From e23787689cb93327f367eb297f1a003e629099a3 Mon Sep 17 00:00:00 2001 From: Daniel Kamkha Date: Mon, 8 Nov 2021 15:34:07 +0100 Subject: [PATCH] Update smoke tests for type alias support in Dart See: #907 Signed-off-by: Daniel Kamkha --- .../output/dart/lib/src/smoke/comments.dart | 44 ++++---- .../lib/src/smoke/comments_interface.dart | 104 +++++++++--------- .../dart/lib/src/smoke/comments_links.dart | 4 +- .../lib/src/smoke/deprecation_comments.dart | 41 +++---- .../src/smoke/deprecation_comments_only.dart | 40 +++---- .../dart/lib/src/smoke/excluded_comments.dart | 21 ++-- .../lib/src/smoke/excluded_comments_only.dart | 18 +-- .../dart/lib/src/smoke/unicode_comments.dart | 6 +- .../lib/src/generic_types__conversion.dart | 21 ++-- .../output/dart/lib/src/smoke/dates.dart | 3 + .../dart/lib/src/smoke/dates_steady.dart | 19 ++-- .../dart/lib/src/smoke/default_values.dart | 23 ++-- .../struct_with_initializer_defaults.dart | 7 +- .../lib/src/smoke/duration_milliseconds.dart | 6 + .../dart/lib/src/smoke/duration_seconds.dart | 6 + .../output/dart/lib/src/smoke/enums.dart | 2 + .../output/dart/lib/src/smoke/equatable.dart | 5 +- .../output/dart/lib/src/package/class.dart | 4 +- .../output/dart/lib/src/package/types.dart | 2 + .../smoke/generic_types_with_basic_types.dart | 15 ++- .../lib/src/smoke/calculator_listener.dart | 11 +- .../src/smoke/listener_with_properties.dart | 21 ++-- .../smoke/listeners_with_return_values.dart | 13 ++- .../output/dart/lib/src/smoke/locales.dart | 6 + .../dart/lib/src/smoke/method_overloads.dart | 14 ++- .../dart/lib/src/smoke/use_free_types.dart | 5 +- .../output/dart/lib/src/smoke/nullable.dart | 30 ++--- .../output/dart/lib/src/smoke/wee_types.dart | 1 + .../output/dart/lib/src/smoke/structs.dart | 3 +- .../dart/lib/src/smoke/public_class.dart | 14 ++- 30 files changed, 292 insertions(+), 217 deletions(-) diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart index b3569e6a9c..2c509c67db 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart @@ -10,29 +10,29 @@ abstract class Comments { @Deprecated("Does nothing") void release(); /// This is some very useful constant. - static final bool veryUseful = true; + static final Comments_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [inputParameter] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [Comments_Usefulness]. Usefulness of the input /// /// Throws [Comments_SomethingWrongException]. Sometimes it happens. /// - bool someMethodWithAllComments(String inputParameter); + Comments_Usefulness someMethodWithAllComments(String inputParameter); /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - bool someMethodWithInputComments(String input); + Comments_Usefulness someMethodWithInputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - /// Returns [bool]. Usefulness of the input + /// Returns [Comments_Usefulness]. Usefulness of the input /// - bool someMethodWithOutputComments(String input); + Comments_Usefulness someMethodWithOutputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - bool someMethodWithNoComments(String input); + Comments_Usefulness someMethodWithNoComments(String input); /// This is some very useful method that does not measure the usefulness of its input. /// /// [input] Very useful input parameter @@ -43,12 +43,12 @@ abstract class Comments { void someMethodWithoutReturnTypeWithNoComments(String input); /// This is some very useful method that measures the usefulness of something. /// - /// Returns [bool]. Usefulness of the input + /// Returns [Comments_Usefulness]. Usefulness of the input /// - bool someMethodWithoutInputParametersWithAllComments(); + Comments_Usefulness someMethodWithoutInputParametersWithAllComments(); /// This is some very useful method that measures the usefulness of something. /// - bool someMethodWithoutInputParametersWithNoComments(); + Comments_Usefulness someMethodWithoutInputParametersWithNoComments(); void someMethodWithNothing(); /// This is some very useful method that does nothing. /// @@ -60,10 +60,12 @@ abstract class Comments { /// String returnCommentOnly(String undocumented); /// Gets some very useful property. - bool get isSomeProperty; + Comments_Usefulness get isSomeProperty; /// Sets some very useful property. - set isSomeProperty(bool value); + set isSomeProperty(Comments_Usefulness value); } +/// This is some very useful typedef. +typedef Comments_Usefulness = bool; /// This is some very useful enum. enum Comments_SomeEnum { /// Not quite useful @@ -131,7 +133,7 @@ class Comments_SomethingWrongException implements Exception { class Comments_SomeStruct { /// How useful this struct is /// remains to be seen - bool someField; + Comments_Usefulness someField; /// Can be `null` String? nullableField; /// This is how easy it is to construct. @@ -357,7 +359,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { @override void release() {} @override - bool someMethodWithAllComments(String inputParameter) { + Comments_Usefulness someMethodWithAllComments(String inputParameter) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithAllComments__String')); final _inputParameterHandle = stringToFfi(inputParameter); final _handle = this.handle; @@ -381,7 +383,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithInputComments(String input) { + Comments_Usefulness someMethodWithInputComments(String input) { final _someMethodWithInputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithInputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -394,7 +396,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithOutputComments(String input) { + Comments_Usefulness someMethodWithOutputComments(String input) { final _someMethodWithOutputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithOutputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -407,7 +409,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithNoComments(String input) { + Comments_Usefulness someMethodWithNoComments(String input) { final _someMethodWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithNoComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -436,7 +438,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { stringReleaseFfiHandle(_inputHandle); } @override - bool someMethodWithoutInputParametersWithAllComments() { + Comments_Usefulness someMethodWithoutInputParametersWithAllComments() { final _someMethodWithoutInputParametersWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_Comments_someMethodWithoutInputParametersWithAllComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithAllCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -447,7 +449,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithoutInputParametersWithNoComments() { + Comments_Usefulness someMethodWithoutInputParametersWithNoComments() { final _someMethodWithoutInputParametersWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_Comments_someMethodWithoutInputParametersWithNoComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithNoCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -498,7 +500,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool get isSomeProperty { + Comments_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_Comments_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -509,7 +511,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - set isSomeProperty(bool value) { + set isSomeProperty(Comments_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_Comments_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart index 956e1c5a30..7daeca339c 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart @@ -8,18 +8,18 @@ import 'package:library/src/builtin_types__conversion.dart'; abstract class CommentsInterface { /// This is some very useful interface. factory CommentsInterface( - bool Function(String) someMethodWithAllCommentsLambda, - bool Function(String) someMethodWithInputCommentsLambda, - bool Function(String) someMethodWithOutputCommentsLambda, - bool Function(String) someMethodWithNoCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithAllCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithInputCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithOutputCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithNoCommentsLambda, void Function(String) someMethodWithoutReturnTypeWithAllCommentsLambda, void Function(String) someMethodWithoutReturnTypeWithNoCommentsLambda, - bool Function() someMethodWithoutInputParametersWithAllCommentsLambda, - bool Function() someMethodWithoutInputParametersWithNoCommentsLambda, + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithAllCommentsLambda, + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithNoCommentsLambda, void Function() someMethodWithNothingLambda, void Function() someMethodWithoutReturnTypeOrInputParametersLambda, - bool Function() isSomePropertyGetLambda, - void Function(bool) isSomePropertySetLambda + CommentsInterface_Usefulness Function() isSomePropertyGetLambda, + void Function(CommentsInterface_Usefulness) isSomePropertySetLambda ) => CommentsInterface$Lambdas( someMethodWithAllCommentsLambda, someMethodWithInputCommentsLambda, @@ -38,27 +38,27 @@ abstract class CommentsInterface { @Deprecated("Does nothing") void release() {} /// This is some very useful constant. - static final bool veryUseful = true; + static final CommentsInterface_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [CommentsInterface_Usefulness]. Usefulness of the input /// - bool someMethodWithAllComments(String input); + CommentsInterface_Usefulness someMethodWithAllComments(String input); /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - bool someMethodWithInputComments(String input); + CommentsInterface_Usefulness someMethodWithInputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - /// Returns [bool]. Usefulness of the input + /// Returns [CommentsInterface_Usefulness]. Usefulness of the input /// - bool someMethodWithOutputComments(String input); + CommentsInterface_Usefulness someMethodWithOutputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - bool someMethodWithNoComments(String input); + CommentsInterface_Usefulness someMethodWithNoComments(String input); /// This is some very useful method that does not measure the usefulness of its input. /// /// [input] Very useful input parameter @@ -69,21 +69,23 @@ abstract class CommentsInterface { void someMethodWithoutReturnTypeWithNoComments(String input); /// This is some very useful method that measures the usefulness of something. /// - /// Returns [bool]. Usefulness of the input + /// Returns [CommentsInterface_Usefulness]. Usefulness of the input /// - bool someMethodWithoutInputParametersWithAllComments(); + CommentsInterface_Usefulness someMethodWithoutInputParametersWithAllComments(); /// This is some very useful method that measures the usefulness of something. /// - bool someMethodWithoutInputParametersWithNoComments(); + CommentsInterface_Usefulness someMethodWithoutInputParametersWithNoComments(); void someMethodWithNothing(); /// This is some very useful method that does nothing. /// void someMethodWithoutReturnTypeOrInputParameters(); /// Gets some very useful property. - bool get isSomeProperty; + CommentsInterface_Usefulness get isSomeProperty; /// Sets some very useful property. - set isSomeProperty(bool value); + set isSomeProperty(CommentsInterface_Usefulness value); } +/// This is some very useful typedef. +typedef CommentsInterface_Usefulness = bool; /// This is some very useful enum. enum CommentsInterface_SomeEnum { /// Not quite useful @@ -145,7 +147,7 @@ void smokeCommentsinterfaceSomeenumReleaseFfiHandleNullable(Pointer handle /// This is some very useful struct. class CommentsInterface_SomeStruct { /// How useful this struct is - bool someField; + CommentsInterface_Usefulness someField; CommentsInterface_SomeStruct(this.someField); } // CommentsInterface_SomeStruct "private" section, not exported. @@ -230,18 +232,18 @@ final _smokeCommentsinterfaceGetTypeId = __lib.catchArgumentError(() => __lib.na Pointer Function(Pointer) >('library_smoke_CommentsInterface_get_type_id')); class CommentsInterface$Lambdas implements CommentsInterface { - bool Function(String) someMethodWithAllCommentsLambda; - bool Function(String) someMethodWithInputCommentsLambda; - bool Function(String) someMethodWithOutputCommentsLambda; - bool Function(String) someMethodWithNoCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithAllCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithInputCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithOutputCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithNoCommentsLambda; void Function(String) someMethodWithoutReturnTypeWithAllCommentsLambda; void Function(String) someMethodWithoutReturnTypeWithNoCommentsLambda; - bool Function() someMethodWithoutInputParametersWithAllCommentsLambda; - bool Function() someMethodWithoutInputParametersWithNoCommentsLambda; + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithAllCommentsLambda; + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithNoCommentsLambda; void Function() someMethodWithNothingLambda; void Function() someMethodWithoutReturnTypeOrInputParametersLambda; - bool Function() isSomePropertyGetLambda; - void Function(bool) isSomePropertySetLambda; + CommentsInterface_Usefulness Function() isSomePropertyGetLambda; + void Function(CommentsInterface_Usefulness) isSomePropertySetLambda; CommentsInterface$Lambdas( this.someMethodWithAllCommentsLambda, this.someMethodWithInputCommentsLambda, @@ -259,16 +261,16 @@ class CommentsInterface$Lambdas implements CommentsInterface { @override void release() {} @override - bool someMethodWithAllComments(String input) => + CommentsInterface_Usefulness someMethodWithAllComments(String input) => someMethodWithAllCommentsLambda(input); @override - bool someMethodWithInputComments(String input) => + CommentsInterface_Usefulness someMethodWithInputComments(String input) => someMethodWithInputCommentsLambda(input); @override - bool someMethodWithOutputComments(String input) => + CommentsInterface_Usefulness someMethodWithOutputComments(String input) => someMethodWithOutputCommentsLambda(input); @override - bool someMethodWithNoComments(String input) => + CommentsInterface_Usefulness someMethodWithNoComments(String input) => someMethodWithNoCommentsLambda(input); @override void someMethodWithoutReturnTypeWithAllComments(String input) => @@ -277,10 +279,10 @@ class CommentsInterface$Lambdas implements CommentsInterface { void someMethodWithoutReturnTypeWithNoComments(String input) => someMethodWithoutReturnTypeWithNoCommentsLambda(input); @override - bool someMethodWithoutInputParametersWithAllComments() => + CommentsInterface_Usefulness someMethodWithoutInputParametersWithAllComments() => someMethodWithoutInputParametersWithAllCommentsLambda(); @override - bool someMethodWithoutInputParametersWithNoComments() => + CommentsInterface_Usefulness someMethodWithoutInputParametersWithNoComments() => someMethodWithoutInputParametersWithNoCommentsLambda(); @override void someMethodWithNothing() => @@ -289,16 +291,16 @@ class CommentsInterface$Lambdas implements CommentsInterface { void someMethodWithoutReturnTypeOrInputParameters() => someMethodWithoutReturnTypeOrInputParametersLambda(); @override - bool get isSomeProperty => isSomePropertyGetLambda(); + CommentsInterface_Usefulness get isSomeProperty => isSomePropertyGetLambda(); @override - set isSomeProperty(bool value) => isSomePropertySetLambda(value); + set isSomeProperty(CommentsInterface_Usefulness value) => isSomePropertySetLambda(value); } class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterface { CommentsInterface$Impl(Pointer handle) : super(handle); @override void release() {} @override - bool someMethodWithAllComments(String input) { + CommentsInterface_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -311,7 +313,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithInputComments(String input) { + CommentsInterface_Usefulness someMethodWithInputComments(String input) { final _someMethodWithInputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithInputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -324,7 +326,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithOutputComments(String input) { + CommentsInterface_Usefulness someMethodWithOutputComments(String input) { final _someMethodWithOutputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithOutputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -337,7 +339,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithNoComments(String input) { + CommentsInterface_Usefulness someMethodWithNoComments(String input) { final _someMethodWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithNoComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -366,7 +368,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa stringReleaseFfiHandle(_inputHandle); } @override - bool someMethodWithoutInputParametersWithAllComments() { + CommentsInterface_Usefulness someMethodWithoutInputParametersWithAllComments() { final _someMethodWithoutInputParametersWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_CommentsInterface_someMethodWithoutInputParametersWithAllComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithAllCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -377,7 +379,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithoutInputParametersWithNoComments() { + CommentsInterface_Usefulness someMethodWithoutInputParametersWithNoComments() { final _someMethodWithoutInputParametersWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_CommentsInterface_someMethodWithoutInputParametersWithNoComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithNoCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -400,7 +402,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa _someMethodWithoutReturnTypeOrInputParametersFfi(_handle, __lib.LibraryContext.isolateId); } /// Gets some very useful property. - bool get isSomeProperty { + CommentsInterface_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_CommentsInterface_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -411,7 +413,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } /// Sets some very useful property. - set isSomeProperty(bool value) { + set isSomeProperty(CommentsInterface_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_CommentsInterface_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; @@ -420,7 +422,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } int _smokeCommentsinterfacesomeMethodWithAllCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithAllComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -430,7 +432,7 @@ int _smokeCommentsinterfacesomeMethodWithAllCommentsStatic(Object _obj, Pointer< return 0; } int _smokeCommentsinterfacesomeMethodWithInputCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithInputComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -440,7 +442,7 @@ int _smokeCommentsinterfacesomeMethodWithInputCommentsStatic(Object _obj, Pointe return 0; } int _smokeCommentsinterfacesomeMethodWithOutputCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithOutputComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -450,7 +452,7 @@ int _smokeCommentsinterfacesomeMethodWithOutputCommentsStatic(Object _obj, Point return 0; } int _smokeCommentsinterfacesomeMethodWithNoCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithNoComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -476,7 +478,7 @@ int _smokeCommentsinterfacesomeMethodWithoutReturnTypeWithNoCommentsStatic(Objec return 0; } int _smokeCommentsinterfacesomeMethodWithoutInputParametersWithAllCommentsStatic(Object _obj, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithoutInputParametersWithAllComments(); _result.value = booleanToFfi(_resultObject); @@ -485,7 +487,7 @@ int _smokeCommentsinterfacesomeMethodWithoutInputParametersWithAllCommentsStatic return 0; } int _smokeCommentsinterfacesomeMethodWithoutInputParametersWithNoCommentsStatic(Object _obj, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithoutInputParametersWithNoComments(); _result.value = booleanToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart index e050c68cc2..bf12ed937c 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart @@ -41,8 +41,8 @@ abstract class CommentsLinks { /// * nested lists /// /// Not working for Java: - /// * typedef: [bool] - /// * top level typedef: [bool] + /// * typedef: [Comments_Usefulness] + /// * top level typedef: [TypeCollectionTypedef] /// /// Not working for Swift: /// * named comment: [][Comments.veryUseful] diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart index ca394b10de..61632d6b25 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart @@ -10,9 +10,9 @@ abstract class DeprecationComments { /// This is some very useful interface. @Deprecated("Unfortunately, this interface is deprecated. Use [Comments] instead.") factory DeprecationComments( - bool Function(String) someMethodWithAllCommentsLambda, - bool Function() isSomePropertyGetLambda, - void Function(bool) isSomePropertySetLambda, + DeprecationComments_Usefulness Function(String) someMethodWithAllCommentsLambda, + DeprecationComments_Usefulness Function() isSomePropertyGetLambda, + void Function(DeprecationComments_Usefulness) isSomePropertySetLambda, String Function() propertyButNotAccessorsGetLambda, void Function(String) propertyButNotAccessorsSetLambda ) => DeprecationComments$Lambdas( @@ -27,27 +27,30 @@ abstract class DeprecationComments { void release() {} /// This is some very useful constant. @Deprecated("Unfortunately, this constant is deprecated. Use [Comments.veryUseful] instead.") - static final bool veryUseful = true; + static final DeprecationComments_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [DeprecationComments_Usefulness]. Usefulness of the input /// @Deprecated("Unfortunately, this method is deprecated.\nUse [Comments.someMethodWithAllComments] instead.") - bool someMethodWithAllComments(String input); + DeprecationComments_Usefulness someMethodWithAllComments(String input); /// Gets some very useful property. @Deprecated("Unfortunately, this property's getter is deprecated.\nUse [Comments.isSomeProperty] instead.") - bool get isSomeProperty; + DeprecationComments_Usefulness get isSomeProperty; /// Sets some very useful property. @Deprecated("Unfortunately, this property's setter is deprecated.\nUse [Comments.isSomeProperty] instead.") - set isSomeProperty(bool value); + set isSomeProperty(DeprecationComments_Usefulness value); /// Gets the property but not accessors. @Deprecated("Will be removed in v3.2.1.") String get propertyButNotAccessors; @Deprecated("Will be removed in v3.2.1.") set propertyButNotAccessors(String value); } +/// This is some very useful typedef. +@Deprecated("Unfortunately, this typedef is deprecated. Use [Comments_Usefulness] instead.") +typedef DeprecationComments_Usefulness = bool; /// This is some very useful enum. @Deprecated("Unfortunately, this enum is deprecated. Use [Comments_SomeEnum] instead.") enum DeprecationComments_SomeEnum { @@ -112,7 +115,7 @@ class DeprecationComments_SomethingWrongException implements Exception { class DeprecationComments_SomeStruct { /// How useful this struct is. @Deprecated("Unfortunately, this field is deprecated.\nUse [Comments_SomeStruct.someField] instead.") - bool someField; + DeprecationComments_Usefulness someField; DeprecationComments_SomeStruct(this.someField); } // DeprecationComments_SomeStruct "private" section, not exported. @@ -197,9 +200,9 @@ final _smokeDeprecationcommentsGetTypeId = __lib.catchArgumentError(() => __lib. Pointer Function(Pointer) >('library_smoke_DeprecationComments_get_type_id')); class DeprecationComments$Lambdas implements DeprecationComments { - bool Function(String) someMethodWithAllCommentsLambda; - bool Function() isSomePropertyGetLambda; - void Function(bool) isSomePropertySetLambda; + DeprecationComments_Usefulness Function(String) someMethodWithAllCommentsLambda; + DeprecationComments_Usefulness Function() isSomePropertyGetLambda; + void Function(DeprecationComments_Usefulness) isSomePropertySetLambda; String Function() propertyButNotAccessorsGetLambda; void Function(String) propertyButNotAccessorsSetLambda; DeprecationComments$Lambdas( @@ -212,12 +215,12 @@ class DeprecationComments$Lambdas implements DeprecationComments { @override void release() {} @override - bool someMethodWithAllComments(String input) => + DeprecationComments_Usefulness someMethodWithAllComments(String input) => someMethodWithAllCommentsLambda(input); @override - bool get isSomeProperty => isSomePropertyGetLambda(); + DeprecationComments_Usefulness get isSomeProperty => isSomePropertyGetLambda(); @override - set isSomeProperty(bool value) => isSomePropertySetLambda(value); + set isSomeProperty(DeprecationComments_Usefulness value) => isSomePropertySetLambda(value); @override String get propertyButNotAccessors => propertyButNotAccessorsGetLambda(); @override @@ -228,7 +231,7 @@ class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationCo @override void release() {} @override - bool someMethodWithAllComments(String input) { + DeprecationComments_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_DeprecationComments_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -242,7 +245,7 @@ class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationCo } /// Gets some very useful property. @Deprecated("Unfortunately, this property's getter is deprecated.\nUse [Comments.isSomeProperty] instead.") - bool get isSomeProperty { + DeprecationComments_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_DeprecationComments_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -254,7 +257,7 @@ class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationCo } /// Sets some very useful property. @Deprecated("Unfortunately, this property's setter is deprecated.\nUse [Comments.isSomeProperty] instead.") - set isSomeProperty(bool value) { + set isSomeProperty(DeprecationComments_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_DeprecationComments_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; @@ -283,7 +286,7 @@ class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationCo } } int _smokeDeprecationcommentssomeMethodWithAllCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + DeprecationComments_Usefulness? _resultObject; try { _resultObject = (_obj as DeprecationComments).someMethodWithAllComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart index bdc718cadf..95c0281396 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart @@ -8,9 +8,9 @@ import 'package:library/src/builtin_types__conversion.dart'; abstract class DeprecationCommentsOnly { @Deprecated("Unfortunately, this interface is deprecated.") factory DeprecationCommentsOnly( - bool Function(String) someMethodWithAllCommentsLambda, - bool Function() isSomePropertyGetLambda, - void Function(bool) isSomePropertySetLambda + DeprecationCommentsOnly_Usefulness Function(String) someMethodWithAllCommentsLambda, + DeprecationCommentsOnly_Usefulness Function() isSomePropertyGetLambda, + void Function(DeprecationCommentsOnly_Usefulness) isSomePropertySetLambda ) => DeprecationCommentsOnly$Lambdas( someMethodWithAllCommentsLambda, isSomePropertyGetLambda, @@ -20,18 +20,20 @@ abstract class DeprecationCommentsOnly { @Deprecated("Does nothing") void release() {} @Deprecated("Unfortunately, this constant is deprecated.") - static final bool veryUseful = true; + static final DeprecationCommentsOnly_Usefulness veryUseful = true; /// [input] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [DeprecationCommentsOnly_Usefulness]. Usefulness of the input /// @Deprecated("Unfortunately, this method is deprecated.") - bool someMethodWithAllComments(String input); + DeprecationCommentsOnly_Usefulness someMethodWithAllComments(String input); @Deprecated("Unfortunately, this property's getter is deprecated.") - bool get isSomeProperty; + DeprecationCommentsOnly_Usefulness get isSomeProperty; @Deprecated("Unfortunately, this property's setter is deprecated.") - set isSomeProperty(bool value); + set isSomeProperty(DeprecationCommentsOnly_Usefulness value); } +@Deprecated("Unfortunately, this typedef is deprecated.") +typedef DeprecationCommentsOnly_Usefulness = bool; @Deprecated("Unfortunately, this enum is deprecated.") enum DeprecationCommentsOnly_SomeEnum { @Deprecated("Unfortunately, this item is deprecated.") @@ -87,7 +89,7 @@ void smokeDeprecationcommentsonlySomeenumReleaseFfiHandleNullable(Pointer @Deprecated("Unfortunately, this struct is deprecated.") class DeprecationCommentsOnly_SomeStruct { @Deprecated("Unfortunately, this field is deprecated.") - bool someField; + DeprecationCommentsOnly_Usefulness someField; DeprecationCommentsOnly_SomeStruct(this.someField); } // DeprecationCommentsOnly_SomeStruct "private" section, not exported. @@ -172,9 +174,9 @@ final _smokeDeprecationcommentsonlyGetTypeId = __lib.catchArgumentError(() => __ Pointer Function(Pointer) >('library_smoke_DeprecationCommentsOnly_get_type_id')); class DeprecationCommentsOnly$Lambdas implements DeprecationCommentsOnly { - bool Function(String) someMethodWithAllCommentsLambda; - bool Function() isSomePropertyGetLambda; - void Function(bool) isSomePropertySetLambda; + DeprecationCommentsOnly_Usefulness Function(String) someMethodWithAllCommentsLambda; + DeprecationCommentsOnly_Usefulness Function() isSomePropertyGetLambda; + void Function(DeprecationCommentsOnly_Usefulness) isSomePropertySetLambda; DeprecationCommentsOnly$Lambdas( this.someMethodWithAllCommentsLambda, this.isSomePropertyGetLambda, @@ -183,19 +185,19 @@ class DeprecationCommentsOnly$Lambdas implements DeprecationCommentsOnly { @override void release() {} @override - bool someMethodWithAllComments(String input) => + DeprecationCommentsOnly_Usefulness someMethodWithAllComments(String input) => someMethodWithAllCommentsLambda(input); @override - bool get isSomeProperty => isSomePropertyGetLambda(); + DeprecationCommentsOnly_Usefulness get isSomeProperty => isSomePropertyGetLambda(); @override - set isSomeProperty(bool value) => isSomePropertySetLambda(value); + set isSomeProperty(DeprecationCommentsOnly_Usefulness value) => isSomePropertySetLambda(value); } class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements DeprecationCommentsOnly { DeprecationCommentsOnly$Impl(Pointer handle) : super(handle); @override void release() {} @override - bool someMethodWithAllComments(String input) { + DeprecationCommentsOnly_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_DeprecationCommentsOnly_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -208,7 +210,7 @@ class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements Deprecati } } @Deprecated("Unfortunately, this property's getter is deprecated.") - bool get isSomeProperty { + DeprecationCommentsOnly_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_DeprecationCommentsOnly_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -219,7 +221,7 @@ class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements Deprecati } } @Deprecated("Unfortunately, this property's setter is deprecated.") - set isSomeProperty(bool value) { + set isSomeProperty(DeprecationCommentsOnly_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_DeprecationCommentsOnly_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; @@ -228,7 +230,7 @@ class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements Deprecati } } int _smokeDeprecationcommentsonlysomeMethodWithAllCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + DeprecationCommentsOnly_Usefulness? _resultObject; try { _resultObject = (_obj as DeprecationCommentsOnly).someMethodWithAllComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart index 7547454546..6fd9adea8a 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart @@ -11,28 +11,31 @@ abstract class ExcludedComments { void release(); /// This is some very useful constant. /// @nodoc - static final bool veryUseful = true; + static final ExcludedComments_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [inputParameter] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [ExcludedComments_Usefulness]. Usefulness of the input /// /// Throws [ExcludedComments_SomethingWrongException]. Sometimes it happens. /// /// @nodoc - bool someMethodWithAllComments(String inputParameter); + ExcludedComments_Usefulness someMethodWithAllComments(String inputParameter); /// This is some very useful method that does nothing. /// /// @nodoc void someMethodWithoutReturnTypeOrInputParameters(); /// Gets some very useful property. /// @nodoc - bool get isSomeProperty; + ExcludedComments_Usefulness get isSomeProperty; /// Sets some very useful property. /// @nodoc - set isSomeProperty(bool value); + set isSomeProperty(ExcludedComments_Usefulness value); } +/// This is some very useful typealias. +/// @nodoc +typedef ExcludedComments_Usefulness = bool; /// This is some very useful enum. /// @nodoc enum ExcludedComments_SomeEnum { @@ -99,7 +102,7 @@ class ExcludedComments_SomeStruct { /// How useful this struct is /// remains to be seen /// @nodoc - bool someField; + ExcludedComments_Usefulness someField; /// This is how easy it is to construct. /// [someField] How useful this struct is /// remains to be seen @@ -291,7 +294,7 @@ class ExcludedComments$Impl extends __lib.NativeBase implements ExcludedComments @override void release() {} @override - bool someMethodWithAllComments(String inputParameter) { + ExcludedComments_Usefulness someMethodWithAllComments(String inputParameter) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_ExcludedComments_someMethodWithAllComments__String')); final _inputParameterHandle = stringToFfi(inputParameter); final _handle = this.handle; @@ -321,7 +324,7 @@ class ExcludedComments$Impl extends __lib.NativeBase implements ExcludedComments _someMethodWithoutReturnTypeOrInputParametersFfi(_handle, __lib.LibraryContext.isolateId); } @override - bool get isSomeProperty { + ExcludedComments_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_ExcludedComments_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -332,7 +335,7 @@ class ExcludedComments$Impl extends __lib.NativeBase implements ExcludedComments } } @override - set isSomeProperty(bool value) { + set isSomeProperty(ExcludedComments_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_ExcludedComments_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart index 3137588c66..8edaee238b 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart @@ -9,17 +9,19 @@ abstract class ExcludedCommentsOnly { @Deprecated("Does nothing") void release(); /// @nodoc - static final bool veryUseful = true; + static final ExcludedCommentsOnly_Usefulness veryUseful = true; /// @nodoc - bool someMethodWithAllComments(String inputParameter); + ExcludedCommentsOnly_Usefulness someMethodWithAllComments(String inputParameter); /// @nodoc void someMethodWithoutReturnTypeOrInputParameters(); /// @nodoc - bool get isSomeProperty; + ExcludedCommentsOnly_Usefulness get isSomeProperty; /// @nodoc - set isSomeProperty(bool value); + set isSomeProperty(ExcludedCommentsOnly_Usefulness value); } /// @nodoc +typedef ExcludedCommentsOnly_Usefulness = bool; +/// @nodoc enum ExcludedCommentsOnly_SomeEnum { /// @nodoc useless @@ -79,7 +81,7 @@ class ExcludedCommentsOnly_SomethingWrongException implements Exception { /// @nodoc class ExcludedCommentsOnly_SomeStruct { /// @nodoc - bool someField; + ExcludedCommentsOnly_Usefulness someField; ExcludedCommentsOnly_SomeStruct(this.someField); } // ExcludedCommentsOnly_SomeStruct "private" section, not exported. @@ -267,7 +269,7 @@ class ExcludedCommentsOnly$Impl extends __lib.NativeBase implements ExcludedComm @override void release() {} @override - bool someMethodWithAllComments(String inputParameter) { + ExcludedCommentsOnly_Usefulness someMethodWithAllComments(String inputParameter) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_ExcludedCommentsOnly_someMethodWithAllComments__String')); final _inputParameterHandle = stringToFfi(inputParameter); final _handle = this.handle; @@ -297,7 +299,7 @@ class ExcludedCommentsOnly$Impl extends __lib.NativeBase implements ExcludedComm _someMethodWithoutReturnTypeOrInputParametersFfi(_handle, __lib.LibraryContext.isolateId); } @override - bool get isSomeProperty { + ExcludedCommentsOnly_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_ExcludedCommentsOnly_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -308,7 +310,7 @@ class ExcludedCommentsOnly$Impl extends __lib.NativeBase implements ExcludedComm } } @override - set isSomeProperty(bool value) { + set isSomeProperty(ExcludedCommentsOnly_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_ExcludedCommentsOnly_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart index 4fd31841ca..ceeff5a1f3 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart @@ -12,11 +12,11 @@ abstract class UnicodeComments { /// /// [input] שלום /// - /// Returns [bool]. товарищ + /// Returns [Comments_Usefulness]. товарищ /// /// Throws [Comments_SomethingWrongException]. ネコ /// - bool someMethodWithAllComments(String input); + Comments_Usefulness someMethodWithAllComments(String input); } // UnicodeComments "private" section, not exported. final _smokeUnicodecommentsRegisterFinalizer = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< @@ -52,7 +52,7 @@ class UnicodeComments$Impl extends __lib.NativeBase implements UnicodeComments { @override void release() {} @override - bool someMethodWithAllComments(String input) { + Comments_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_UnicodeComments_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart index ec8b078995..968463534a 100644 --- a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart +++ b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart @@ -1,4 +1,5 @@ import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/smoke/dates_steady.dart'; import 'dart:ffi'; import 'package:library/src/_library_context.dart' as __lib; final _foobarListofDateCreateHandle = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< @@ -118,7 +119,7 @@ final _foobarListofDateStd2chrono2steady1clock2time1pointIteratorGet = __lib.cat Uint64 Function(Pointer), int Function(Pointer) >('library_foobar_ListOf_Date_std_2chrono_2steady_1clock_2time_1point_iterator_get')); -Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfi(List value) { +Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfi(List value) { final _result = _foobarListofDateStd2chrono2steady1clock2time1pointCreateHandle(); for (final element in value) { final _elementHandle = dateToFfi(element); @@ -127,8 +128,8 @@ Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfi(List foobarListofDateStd2chrono2steady1clock2time1pointFromFfi(Pointer handle) { - final result = List.empty(growable: true); +List foobarListofDateStd2chrono2steady1clock2time1pointFromFfi(Pointer handle) { + final result = List.empty(growable: true); final _iteratorHandle = _foobarListofDateStd2chrono2steady1clock2time1pointIterator(handle); while (_foobarListofDateStd2chrono2steady1clock2time1pointIteratorIsValid(handle, _iteratorHandle) != 0) { final _elementHandle = _foobarListofDateStd2chrono2steady1clock2time1pointIteratorGet(_iteratorHandle); @@ -155,14 +156,14 @@ final _foobarListofDateStd2chrono2steady1clock2time1pointGetValueNullable = __li Pointer Function(Pointer), Pointer Function(Pointer) >('library_foobar_ListOf_Date_std_2chrono_2steady_1clock_2time_1point_get_value_nullable')); -Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfiNullable(List? value) { +Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfiNullable(List? value) { if (value == null) return Pointer.fromAddress(0); final _handle = foobarListofDateStd2chrono2steady1clock2time1pointToFfi(value); final result = _foobarListofDateStd2chrono2steady1clock2time1pointCreateHandleNullable(_handle); foobarListofDateStd2chrono2steady1clock2time1pointReleaseFfiHandle(_handle); return result; } -List? foobarListofDateStd2chrono2steady1clock2time1pointFromFfiNullable(Pointer handle) { +List? foobarListofDateStd2chrono2steady1clock2time1pointFromFfiNullable(Pointer handle) { if (handle.address == 0) return null; final _handle = _foobarListofDateStd2chrono2steady1clock2time1pointGetValueNullable(handle); final result = foobarListofDateStd2chrono2steady1clock2time1pointFromFfi(_handle); @@ -207,7 +208,7 @@ final _foobarMapofDateStd2chrono2steady1clock2time1pointToStringIteratorGetValue Pointer Function(Pointer), Pointer Function(Pointer) >('library_foobar_MapOf_Date_std_2chrono_2steady_1clock_2time_1point_to_String_iterator_get_value')); -Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(Map value) { +Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(Map value) { final _result = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringCreateHandle(); for (final entry in value.entries) { final _keyHandle = dateToFfi(entry.key); @@ -218,8 +219,8 @@ Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(Map } return _result; } -Map foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfi(Pointer handle) { - final result = Map(); +Map foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfi(Pointer handle) { + final result = Map(); final _iteratorHandle = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringIterator(handle); while (_foobarMapofDateStd2chrono2steady1clock2time1pointToStringIteratorIsValid(handle, _iteratorHandle) != 0) { final _keyHandle = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringIteratorGetKey(_iteratorHandle); @@ -249,14 +250,14 @@ final _foobarMapofDateStd2chrono2steady1clock2time1pointToStringGetValueNullable Pointer Function(Pointer), Pointer Function(Pointer) >('library_foobar_MapOf_Date_std_2chrono_2steady_1clock_2time_1point_to_String_get_value_nullable')); -Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfiNullable(Map? value) { +Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfiNullable(Map? value) { if (value == null) return Pointer.fromAddress(0); final _handle = foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(value); final result = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringCreateHandleNullable(_handle); foobarMapofDateStd2chrono2steady1clock2time1pointToStringReleaseFfiHandle(_handle); return result; } -Map? foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfiNullable(Pointer handle) { +Map? foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfiNullable(Pointer handle) { if (handle.address == 0) return null; final _handle = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringGetValueNullable(handle); final result = foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfi(_handle); diff --git a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart index 9718fa425c..ffb9cce488 100644 --- a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart +++ b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart @@ -15,6 +15,9 @@ abstract class Dates { Set get dateSet; set dateSet(Set value); } +typedef Dates_DateTypeDef = DateTime; +typedef Dates_DateArray = List; +typedef Dates_DateMap = Map; class Dates_DateStruct { DateTime dateField; DateTime? nullableDateField; diff --git a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart index 5ba659b50d..a0b0179064 100644 --- a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart +++ b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart @@ -8,13 +8,16 @@ abstract class DatesSteady { /// @nodoc @Deprecated("Does nothing") void release(); - DateTime dateMethod(DateTime input); - DateTime? nullableDateMethod(DateTime? input); - List dateListMethod(List input); + DatesSteady_MonotonicDate dateMethod(DatesSteady_MonotonicDate input); + DatesSteady_MonotonicDate? nullableDateMethod(DatesSteady_MonotonicDate? input); + DatesSteady_DateList dateListMethod(DatesSteady_DateList input); } +typedef DatesSteady_MonotonicDate = DateTime; +typedef DatesSteady_DateList = List; +typedef DatesSteady_DateMap = Map; class DatesSteady_DateStruct { - DateTime dateField; - DateTime? nullableDateField; + DatesSteady_MonotonicDate dateField; + DatesSteady_MonotonicDate? nullableDateField; DatesSteady_DateStruct(this.dateField, this.nullableDateField); } // DatesSteady_DateStruct "private" section, not exported. @@ -104,7 +107,7 @@ class DatesSteady$Impl extends __lib.NativeBase implements DatesSteady { @override void release() {} @override - DateTime dateMethod(DateTime input) { + DatesSteady_MonotonicDate dateMethod(DatesSteady_MonotonicDate input) { final _dateMethodFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint64), int Function(Pointer, int, int)>('library_smoke_DatesSteady_dateMethod__Date')); final _inputHandle = dateToFfi(input); final _handle = this.handle; @@ -117,7 +120,7 @@ class DatesSteady$Impl extends __lib.NativeBase implements DatesSteady { } } @override - DateTime? nullableDateMethod(DateTime? input) { + DatesSteady_MonotonicDate? nullableDateMethod(DatesSteady_MonotonicDate? input) { final _nullableDateMethodFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_DatesSteady_nullableDateMethod__Date_')); final _inputHandle = dateToFfiNullable(input); final _handle = this.handle; @@ -130,7 +133,7 @@ class DatesSteady$Impl extends __lib.NativeBase implements DatesSteady { } } @override - List dateListMethod(List input) { + DatesSteady_DateList dateListMethod(DatesSteady_DateList input) { final _dateListMethodFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_DatesSteady_dateListMethod__ListOf_Date_std_2chrono_2steady_1clock_2time_1point')); final _inputHandle = foobarListofDateStd2chrono2steady1clock2time1pointToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart b/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart index 0604a44ff4..3c88fa9dae 100644 --- a/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart +++ b/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart @@ -14,6 +14,13 @@ abstract class DefaultValues { @visibleForTesting static dynamic $prototype = DefaultValues$Impl(Pointer.fromAddress(0)); } +typedef DefaultValues_LongTypedef = int; +typedef DefaultValues_BooleanTypedef = bool; +typedef DefaultValues_StringTypedef = String; +typedef DefaultValues_EnumTypedef = DefaultValues_SomeEnum; +typedef DefaultValues_FloatArray = List; +typedef DefaultValues_IdToStringMap = Map; +typedef DefaultValues_StringSet = Set; enum DefaultValues_SomeEnum { fooValue, barValue @@ -474,10 +481,10 @@ void smokeDefaultvaluesStructwithspecialdefaultsReleaseFfiHandleNullable(Pointer // End of DefaultValues_StructWithSpecialDefaults "private" section. class DefaultValues_StructWithEmptyDefaults { List intsField; - List floatsField; - Map mapField; + DefaultValues_FloatArray floatsField; + DefaultValues_IdToStringMap mapField; DefaultValues_StructWithDefaults structField; - Set setTypeField; + DefaultValues_StringSet setTypeField; DefaultValues_StructWithEmptyDefaults(this.intsField, this.floatsField, this.mapField, this.structField, this.setTypeField); DefaultValues_StructWithEmptyDefaults.withDefaults() : intsField = [], floatsField = [], mapField = {}, structField = DefaultValues_StructWithDefaults.withDefaults(), setTypeField = {}; @@ -579,13 +586,13 @@ void smokeDefaultvaluesStructwithemptydefaultsReleaseFfiHandleNullable(Pointer __lib.nativeLibrary.lookupFunction< diff --git a/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/struct_with_initializer_defaults.dart b/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/struct_with_initializer_defaults.dart index 0ea16ac4d9..c94650e58f 100644 --- a/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/struct_with_initializer_defaults.dart +++ b/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/struct_with_initializer_defaults.dart @@ -1,13 +1,14 @@ import 'dart:ffi'; import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/generic_types__conversion.dart'; +import 'package:library/src/smoke/default_values.dart'; import 'package:library/src/smoke/types_with_defaults.dart'; class StructWithInitializerDefaults { List intsField; - List floatsField; + DefaultValues_FloatArray floatsField; StructWithAnEnum structField; - Set setTypeField; - Map mapField; + DefaultValues_StringSet setTypeField; + DefaultValues_IdToStringMap mapField; StructWithInitializerDefaults(this.intsField, this.floatsField, this.structField, this.setTypeField, this.mapField); StructWithInitializerDefaults.withDefaults() : intsField = [4, -2, 42], floatsField = [3.14, double.negativeInfinity], structField = StructWithAnEnum(AnEnum.disabled), setTypeField = {"foo", "bar"}, mapField = {1: "foo", 42: "bar"}; diff --git a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart index 35cd288573..018ebc1631 100644 --- a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart +++ b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart @@ -3,6 +3,7 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; abstract class DurationMilliseconds { /// @nodoc @Deprecated("Does nothing") @@ -12,6 +13,11 @@ abstract class DurationMilliseconds { Duration get durationProperty; set durationProperty(Duration value); } +typedef DurationMilliseconds_DurationTypeAlias = Duration; +typedef DurationMilliseconds_DurationList = List; +typedef DurationMilliseconds_DurationSet = Set; +typedef DurationMilliseconds_DurationMap = Map; +typedef DurationMilliseconds_DurationKeyMap = Map; class DurationMilliseconds_DurationStruct { Duration durationField; DurationMilliseconds_DurationStruct(this.durationField); diff --git a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart index eafb9793d0..0342d5eed6 100644 --- a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart +++ b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart @@ -3,6 +3,7 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; abstract class DurationSeconds { /// @nodoc @Deprecated("Does nothing") @@ -12,6 +13,11 @@ abstract class DurationSeconds { Duration get durationProperty; set durationProperty(Duration value); } +typedef DurationSeconds_DurationTypeAlias = Duration; +typedef DurationSeconds_DurationList = List; +typedef DurationSeconds_DurationSet = Set; +typedef DurationSeconds_DurationMap = Map; +typedef DurationSeconds_DurationKeyMap = Map; class DurationSeconds_DurationStruct { Duration durationField; DurationSeconds_DurationStruct(this.durationField); diff --git a/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart b/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart index 8a9ac034f8..8c3d0d9b65 100644 --- a/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart +++ b/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart @@ -3,6 +3,7 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; import 'package:meta/meta.dart'; abstract class Enums { /// @nodoc @@ -16,6 +17,7 @@ abstract class Enums { @visibleForTesting static dynamic $prototype = Enums$Impl(Pointer.fromAddress(0)); } +typedef Enums_ExampleMap = Map; enum Enums_SimpleEnum { first, second diff --git a/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart b/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart index 2fe9690f4d..60906c0bd5 100644 --- a/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart +++ b/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart @@ -3,6 +3,7 @@ import 'package:collection/collection.dart'; import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; import 'package:library/src/generic_types__conversion.dart'; +typedef ErrorCodeToMessageMap = Map; enum SomeEnum { foo, bar @@ -68,7 +69,7 @@ class EquatableStruct { NestedEquatableStruct structField; SomeEnum enumField; List arrayField; - Map mapField; + ErrorCodeToMessageMap mapField; EquatableStruct(this.boolField, this.intField, this.longField, this.floatField, this.doubleField, this.stringField, this.structField, this.enumField, this.arrayField, this.mapField); @override bool operator ==(Object other) { @@ -244,7 +245,7 @@ class EquatableNullableStruct { NestedEquatableStruct? structField; SomeEnum? enumField; List? arrayField; - Map? mapField; + ErrorCodeToMessageMap? mapField; EquatableNullableStruct(this.boolField, this.intField, this.uintField, this.floatField, this.stringField, this.structField, this.enumField, this.arrayField, this.mapField); @override bool operator ==(Object other) { diff --git a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart index 5df000f0a6..20cb00c9f4 100644 --- a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart +++ b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart @@ -13,7 +13,7 @@ abstract class Class implements Interface { /// @nodoc @Deprecated("Does nothing") void release(); - Struct fun(List double); + Struct fun(ULong double); Enum get property; set property(Enum value); /// @nodoc @@ -72,7 +72,7 @@ class Class$Impl extends __lib.NativeBase implements Class { return __resultHandle; } @override - Struct fun(List double) { + Struct fun(ULong double) { final _funFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_package_Class_fun__ListOf_package_Types_Struct')); final _doubleHandle = foobarListofPackageTypesStructToFfi(double); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart index a734ad3f34..894f27f280 100644 --- a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart +++ b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart @@ -1,5 +1,7 @@ import 'dart:ffi'; import 'package:library/src/_library_context.dart' as __lib; +import 'package:library/src/generic_types__conversion.dart'; +typedef ULong = List; enum Enum { naN } diff --git a/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart b/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart index dccb93842e..109304f7a6 100644 --- a/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart +++ b/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart @@ -10,9 +10,9 @@ abstract class GenericTypesWithBasicTypes { List methodWithList(List input); Map methodWithMap(Map input); Set methodWithSet(Set input); - List methodWithListTypeAlias(List input); - Map methodWithMapTypeAlias(Map input); - Set methodWithSetTypeAlias(Set input); + GenericTypesWithBasicTypes_BasicList methodWithListTypeAlias(GenericTypesWithBasicTypes_BasicList input); + GenericTypesWithBasicTypes_BasicMap methodWithMapTypeAlias(GenericTypesWithBasicTypes_BasicMap input); + GenericTypesWithBasicTypes_BasicSet methodWithSetTypeAlias(GenericTypesWithBasicTypes_BasicSet input); List get listProperty; set listProperty(List value); Map get mapProperty; @@ -20,6 +20,9 @@ abstract class GenericTypesWithBasicTypes { Set get setProperty; set setProperty(Set value); } +typedef GenericTypesWithBasicTypes_BasicList = List; +typedef GenericTypesWithBasicTypes_BasicMap = Map; +typedef GenericTypesWithBasicTypes_BasicSet = Set; class GenericTypesWithBasicTypes_StructWithGenerics { List numbersList; Map numbersMap; @@ -161,7 +164,7 @@ class GenericTypesWithBasicTypes$Impl extends __lib.NativeBase implements Generi } } @override - List methodWithListTypeAlias(List input) { + GenericTypesWithBasicTypes_BasicList methodWithListTypeAlias(GenericTypesWithBasicTypes_BasicList input) { final _methodWithListTypeAliasFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_GenericTypesWithBasicTypes_methodWithListTypeAlias__ListOf_String')); final _inputHandle = foobarListofStringToFfi(input); final _handle = this.handle; @@ -174,7 +177,7 @@ class GenericTypesWithBasicTypes$Impl extends __lib.NativeBase implements Generi } } @override - Map methodWithMapTypeAlias(Map input) { + GenericTypesWithBasicTypes_BasicMap methodWithMapTypeAlias(GenericTypesWithBasicTypes_BasicMap input) { final _methodWithMapTypeAliasFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_GenericTypesWithBasicTypes_methodWithMapTypeAlias__MapOf_String_to_String')); final _inputHandle = foobarMapofStringToStringToFfi(input); final _handle = this.handle; @@ -187,7 +190,7 @@ class GenericTypesWithBasicTypes$Impl extends __lib.NativeBase implements Generi } } @override - Set methodWithSetTypeAlias(Set input) { + GenericTypesWithBasicTypes_BasicSet methodWithSetTypeAlias(GenericTypesWithBasicTypes_BasicSet input) { final _methodWithSetTypeAliasFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_GenericTypesWithBasicTypes_methodWithSetTypeAlias__SetOf_String')); final _inputHandle = foobarSetofStringToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart index 48ed0d44ee..7881cd2190 100644 --- a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart +++ b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart @@ -12,7 +12,7 @@ abstract class CalculatorListener { void Function(double) onCalculationResultConstLambda, void Function(CalculatorListener_ResultStruct) onCalculationResultStructLambda, void Function(List) onCalculationResultArrayLambda, - void Function(Map) onCalculationResultMapLambda, + void Function(CalculatorListener_NamedCalculationResults) onCalculationResultMapLambda, void Function(CalculationResult) onCalculationResultInstanceLambda, ) => CalculatorListener$Lambdas( onCalculationResultLambda, @@ -29,9 +29,10 @@ abstract class CalculatorListener { void onCalculationResultConst(double calculationResult); void onCalculationResultStruct(CalculatorListener_ResultStruct calculationResult); void onCalculationResultArray(List calculationResult); - void onCalculationResultMap(Map calculationResults); + void onCalculationResultMap(CalculatorListener_NamedCalculationResults calculationResults); void onCalculationResultInstance(CalculationResult calculationResult); } +typedef CalculatorListener_NamedCalculationResults = Map; class CalculatorListener_ResultStruct { double result; CalculatorListener_ResultStruct(this.result); @@ -120,7 +121,7 @@ class CalculatorListener$Lambdas implements CalculatorListener { void Function(double) onCalculationResultConstLambda; void Function(CalculatorListener_ResultStruct) onCalculationResultStructLambda; void Function(List) onCalculationResultArrayLambda; - void Function(Map) onCalculationResultMapLambda; + void Function(CalculatorListener_NamedCalculationResults) onCalculationResultMapLambda; void Function(CalculationResult) onCalculationResultInstanceLambda; CalculatorListener$Lambdas( this.onCalculationResultLambda, @@ -145,7 +146,7 @@ class CalculatorListener$Lambdas implements CalculatorListener { void onCalculationResultArray(List calculationResult) => onCalculationResultArrayLambda(calculationResult); @override - void onCalculationResultMap(Map calculationResults) => + void onCalculationResultMap(CalculatorListener_NamedCalculationResults calculationResults) => onCalculationResultMapLambda(calculationResults); @override void onCalculationResultInstance(CalculationResult calculationResult) => @@ -186,7 +187,7 @@ class CalculatorListener$Impl extends __lib.NativeBase implements CalculatorList foobarListofDoubleReleaseFfiHandle(_calculationResultHandle); } @override - void onCalculationResultMap(Map calculationResults) { + void onCalculationResultMap(CalculatorListener_NamedCalculationResults calculationResults) { final _onCalculationResultMapFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_CalculatorListener_onCalculationResultMap__MapOf_String_to_Double')); final _calculationResultsHandle = foobarMapofStringToDoubleToFfi(calculationResults); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart index f0bf2be097..393eb7b8e2 100644 --- a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart +++ b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart @@ -19,8 +19,8 @@ abstract class ListenerWithProperties { void Function(ListenerWithProperties_ResultEnum) enumeratedMessageSetLambda, List Function() arrayedMessageGetLambda, void Function(List) arrayedMessageSetLambda, - Map Function() mappedMessageGetLambda, - void Function(Map) mappedMessageSetLambda, + ListenerWithProperties_StringToDouble Function() mappedMessageGetLambda, + void Function(ListenerWithProperties_StringToDouble) mappedMessageSetLambda, Uint8List Function() bufferedMessageGetLambda, void Function(Uint8List) bufferedMessageSetLambda ) => ListenerWithProperties$Lambdas( @@ -52,11 +52,12 @@ abstract class ListenerWithProperties { set enumeratedMessage(ListenerWithProperties_ResultEnum value); List get arrayedMessage; set arrayedMessage(List value); - Map get mappedMessage; - set mappedMessage(Map value); + ListenerWithProperties_StringToDouble get mappedMessage; + set mappedMessage(ListenerWithProperties_StringToDouble value); Uint8List get bufferedMessage; set bufferedMessage(Uint8List value); } +typedef ListenerWithProperties_StringToDouble = Map; enum ListenerWithProperties_ResultEnum { none, result @@ -206,8 +207,8 @@ class ListenerWithProperties$Lambdas implements ListenerWithProperties { void Function(ListenerWithProperties_ResultEnum) enumeratedMessageSetLambda; List Function() arrayedMessageGetLambda; void Function(List) arrayedMessageSetLambda; - Map Function() mappedMessageGetLambda; - void Function(Map) mappedMessageSetLambda; + ListenerWithProperties_StringToDouble Function() mappedMessageGetLambda; + void Function(ListenerWithProperties_StringToDouble) mappedMessageSetLambda; Uint8List Function() bufferedMessageGetLambda; void Function(Uint8List) bufferedMessageSetLambda; ListenerWithProperties$Lambdas( @@ -249,9 +250,9 @@ class ListenerWithProperties$Lambdas implements ListenerWithProperties { @override set arrayedMessage(List value) => arrayedMessageSetLambda(value); @override - Map get mappedMessage => mappedMessageGetLambda(); + ListenerWithProperties_StringToDouble get mappedMessage => mappedMessageGetLambda(); @override - set mappedMessage(Map value) => mappedMessageSetLambda(value); + set mappedMessage(ListenerWithProperties_StringToDouble value) => mappedMessageSetLambda(value); @override Uint8List get bufferedMessage => bufferedMessageGetLambda(); @override @@ -346,7 +347,7 @@ class ListenerWithProperties$Impl extends __lib.NativeBase implements ListenerWi _setFfi(_handle, __lib.LibraryContext.isolateId, _valueHandle); foobarListofStringReleaseFfiHandle(_valueHandle); } - Map get mappedMessage { + ListenerWithProperties_StringToDouble get mappedMessage { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_ListenerWithProperties_mappedMessage_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -356,7 +357,7 @@ class ListenerWithProperties$Impl extends __lib.NativeBase implements ListenerWi foobarMapofStringToDoubleReleaseFfiHandle(__resultHandle); } } - set mappedMessage(Map value) { + set mappedMessage(ListenerWithProperties_StringToDouble value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_ListenerWithProperties_mappedMessage_set__MapOf_String_to_Double')); final _valueHandle = foobarMapofStringToDoubleToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart index 285b0c8293..e3ceb49a8f 100644 --- a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart +++ b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart @@ -13,7 +13,7 @@ abstract class ListenersWithReturnValues { ListenersWithReturnValues_ResultStruct Function() fetchDataStructLambda, ListenersWithReturnValues_ResultEnum Function() fetchDataEnumLambda, List Function() fetchDataArrayLambda, - Map Function() fetchDataMapLambda, + ListenersWithReturnValues_StringToDouble Function() fetchDataMapLambda, CalculationResult Function() fetchDataInstanceLambda, ) => ListenersWithReturnValues$Lambdas( fetchDataDoubleLambda, @@ -32,9 +32,10 @@ abstract class ListenersWithReturnValues { ListenersWithReturnValues_ResultStruct fetchDataStruct(); ListenersWithReturnValues_ResultEnum fetchDataEnum(); List fetchDataArray(); - Map fetchDataMap(); + ListenersWithReturnValues_StringToDouble fetchDataMap(); CalculationResult fetchDataInstance(); } +typedef ListenersWithReturnValues_StringToDouble = Map; enum ListenersWithReturnValues_ResultEnum { none, result @@ -179,7 +180,7 @@ class ListenersWithReturnValues$Lambdas implements ListenersWithReturnValues { ListenersWithReturnValues_ResultStruct Function() fetchDataStructLambda; ListenersWithReturnValues_ResultEnum Function() fetchDataEnumLambda; List Function() fetchDataArrayLambda; - Map Function() fetchDataMapLambda; + ListenersWithReturnValues_StringToDouble Function() fetchDataMapLambda; CalculationResult Function() fetchDataInstanceLambda; ListenersWithReturnValues$Lambdas( this.fetchDataDoubleLambda, @@ -208,7 +209,7 @@ class ListenersWithReturnValues$Lambdas implements ListenersWithReturnValues { List fetchDataArray() => fetchDataArrayLambda(); @override - Map fetchDataMap() => + ListenersWithReturnValues_StringToDouble fetchDataMap() => fetchDataMapLambda(); @override CalculationResult fetchDataInstance() => @@ -273,7 +274,7 @@ class ListenersWithReturnValues$Impl extends __lib.NativeBase implements Listene } } @override - Map fetchDataMap() { + ListenersWithReturnValues_StringToDouble fetchDataMap() { final _fetchDataMapFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_ListenersWithReturnValues_fetchDataMap')); final _handle = this.handle; final __resultHandle = _fetchDataMapFfi(_handle, __lib.LibraryContext.isolateId); @@ -341,7 +342,7 @@ int _smokeListenerswithreturnvaluesfetchDataArrayStatic(Object _obj, Pointer> _result) { - Map? _resultObject; + ListenersWithReturnValues_StringToDouble? _resultObject; try { _resultObject = (_obj as ListenersWithReturnValues).fetchDataMap(); _result.value = foobarMapofStringToDoubleToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart b/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart index 0e57c19fa4..d22055fba9 100644 --- a/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart +++ b/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart @@ -4,6 +4,7 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; abstract class Locales { /// @nodoc @Deprecated("Does nothing") @@ -12,6 +13,11 @@ abstract class Locales { Locale get localeProperty; set localeProperty(Locale value); } +typedef Locales_LocaleTypeDef = Locale; +typedef Locales_LocaleArray = List; +typedef Locales_LocaleMap = Map; +typedef Locales_LocaleSet = Set; +typedef Locales_LocaleKeyMap = Map; class Locales_LocaleStruct { Locale localeField; Locales_LocaleStruct(this.localeField); diff --git a/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart b/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart index 7a6db7cd5e..b55fccc873 100644 --- a/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart +++ b/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart @@ -13,12 +13,14 @@ abstract class MethodOverloads { bool isBooleanString(String input); bool isBooleanPoint(MethodOverloads_Point input); bool isBooleanMulti(bool input1, int input2, String input3, MethodOverloads_Point input4); - bool isBooleanStringArray(List input); - bool isBooleanIntArray(List input); + bool isBooleanStringArray(MethodOverloads_StringArray input); + bool isBooleanIntArray(MethodOverloads_IntArray input); bool isBooleanConst(); bool isFloatString(String input); - bool isFloatList(List input); + bool isFloatList(MethodOverloads_IntArray input); } +typedef MethodOverloads_StringArray = List; +typedef MethodOverloads_IntArray = List; class MethodOverloads_Point { double x; double y; @@ -176,7 +178,7 @@ class MethodOverloads$Impl extends __lib.NativeBase implements MethodOverloads { } } @override - bool isBooleanStringArray(List input) { + bool isBooleanStringArray(MethodOverloads_StringArray input) { final _isBooleanStringArrayFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_MethodOverloads_isBoolean__ListOf_String')); final _inputHandle = foobarListofStringToFfi(input); final _handle = this.handle; @@ -189,7 +191,7 @@ class MethodOverloads$Impl extends __lib.NativeBase implements MethodOverloads { } } @override - bool isBooleanIntArray(List input) { + bool isBooleanIntArray(MethodOverloads_IntArray input) { final _isBooleanIntArrayFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_MethodOverloads_isBoolean__ListOf_Byte')); final _inputHandle = foobarListofByteToFfi(input); final _handle = this.handle; @@ -226,7 +228,7 @@ class MethodOverloads$Impl extends __lib.NativeBase implements MethodOverloads { } } @override - bool isFloatList(List input) { + bool isFloatList(MethodOverloads_IntArray input) { final _isFloatListFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_MethodOverloads_isFloat__ListOf_Byte')); final _inputHandle = foobarListofByteToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart b/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart index 88cb14f853..8578f076cd 100644 --- a/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart +++ b/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart @@ -6,11 +6,12 @@ import 'package:library/src/builtin_types__conversion.dart'; import 'package:library/src/smoke/free_enum.dart'; import 'package:library/src/smoke/free_exception.dart'; import 'package:library/src/smoke/free_point.dart'; +import 'package:library/src/smoke/free_type_def.dart'; abstract class UseFreeTypes { /// @nodoc @Deprecated("Does nothing") void release(); - DateTime doStuff(FreePoint point, FreeEnum mode); + FreeTypeDef doStuff(FreePoint point, FreeEnum mode); } // UseFreeTypes "private" section, not exported. final _smokeUsefreetypesRegisterFinalizer = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< @@ -46,7 +47,7 @@ class UseFreeTypes$Impl extends __lib.NativeBase implements UseFreeTypes { @override void release() {} @override - DateTime doStuff(FreePoint point, FreeEnum mode) { + FreeTypeDef doStuff(FreePoint point, FreeEnum mode) { final _doStuffFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer, Uint32), Pointer Function(Pointer, int, Pointer, int)>('library_smoke_UseFreeTypes_doStuff__FreePoint_FreeEnum')); final _pointHandle = smokeFreepointToFfi(point); final _modeHandle = smokeFreeenumToFfi(mode); diff --git a/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart b/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart index 8e7197f080..4784b85d61 100644 --- a/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart +++ b/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart @@ -15,9 +15,9 @@ abstract class Nullable { int? methodWithInt(int? input); Nullable_SomeStruct? methodWithSomeStruct(Nullable_SomeStruct? input); Nullable_SomeEnum? methodWithSomeEnum(Nullable_SomeEnum? input); - List? methodWithSomeArray(List? input); + Nullable_SomeArray? methodWithSomeArray(Nullable_SomeArray? input); List? methodWithInlineArray(List? input); - Map? methodWithSomeMap(Map? input); + Nullable_SomeMap? methodWithSomeMap(Nullable_SomeMap? input); SomeInterface? methodWithInstance(SomeInterface? input); String? get stringProperty; set stringProperty(String? value); @@ -31,15 +31,17 @@ abstract class Nullable { set structProperty(Nullable_SomeStruct? value); Nullable_SomeEnum? get enumProperty; set enumProperty(Nullable_SomeEnum? value); - List? get arrayProperty; - set arrayProperty(List? value); + Nullable_SomeArray? get arrayProperty; + set arrayProperty(Nullable_SomeArray? value); List? get inlineArrayProperty; set inlineArrayProperty(List? value); - Map? get mapProperty; - set mapProperty(Map? value); + Nullable_SomeMap? get mapProperty; + set mapProperty(Nullable_SomeMap? value); SomeInterface? get instanceProperty; set instanceProperty(SomeInterface? value); } +typedef Nullable_SomeArray = List; +typedef Nullable_SomeMap = Map; enum Nullable_SomeEnum { on, off @@ -165,9 +167,9 @@ class Nullable_NullableStruct { double? doubleField; Nullable_SomeStruct? structField; Nullable_SomeEnum? enumField; - List? arrayField; + Nullable_SomeArray? arrayField; List? inlineArrayField; - Map? mapField; + Nullable_SomeMap? mapField; SomeInterface? instanceField; Nullable_NullableStruct(this.stringField, this.boolField, this.doubleField, this.structField, this.enumField, this.arrayField, this.inlineArrayField, this.mapField, this.instanceField); } @@ -533,7 +535,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - List? methodWithSomeArray(List? input) { + Nullable_SomeArray? methodWithSomeArray(Nullable_SomeArray? input) { final _methodWithSomeArrayFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_Nullable_methodWithSomeArray__ListOf_String_')); final _inputHandle = foobarListofStringToFfiNullable(input); final _handle = this.handle; @@ -559,7 +561,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - Map? methodWithSomeMap(Map? input) { + Nullable_SomeMap? methodWithSomeMap(Nullable_SomeMap? input) { final _methodWithSomeMapFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_Nullable_methodWithSomeMap__MapOf_Long_to_String_')); final _inputHandle = foobarMapofLongToStringToFfiNullable(input); final _handle = this.handle; @@ -699,7 +701,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { smokeNullableSomeenumReleaseFfiHandleNullable(_valueHandle); } @override - List? get arrayProperty { + Nullable_SomeArray? get arrayProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_Nullable_arrayProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -710,7 +712,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - set arrayProperty(List? value) { + set arrayProperty(Nullable_SomeArray? value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_Nullable_arrayProperty_set__ListOf_String_')); final _valueHandle = foobarListofStringToFfiNullable(value); final _handle = this.handle; @@ -737,7 +739,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { foobarListofStringReleaseFfiHandleNullable(_valueHandle); } @override - Map? get mapProperty { + Nullable_SomeMap? get mapProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_Nullable_mapProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -748,7 +750,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - set mapProperty(Map? value) { + set mapProperty(Nullable_SomeMap? value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_Nullable_mapProperty_set__MapOf_Long_to_String_')); final _valueHandle = foobarMapofLongToStringToFfiNullable(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart b/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart index 1191afc3d5..fb76bb37aa 100644 --- a/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart +++ b/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart @@ -2,6 +2,7 @@ import 'dart:ffi'; import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; import 'package:meta/meta.dart'; +typedef BasicTypedef = double; enum werrEnum { WEE_ITEM } diff --git a/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart b/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart index 7f1ba3922b..e44570f65b 100644 --- a/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart +++ b/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart @@ -19,6 +19,7 @@ abstract class Structs { @visibleForTesting static dynamic $prototype = Structs$Impl(Pointer.fromAddress(0)); } +typedef Structs_ArrayOfImmutable = List; enum Structs_FooBar { foo, bar @@ -522,7 +523,7 @@ void smokeStructsDoublenestingimmutablestructReleaseFfiHandleNullable(Pointer arrayField; + Structs_ArrayOfImmutable arrayField; Structs_StructWithArrayOfImmutable(this.arrayField); } // Structs_StructWithArrayOfImmutable "private" section, not exported. diff --git a/gluecodium/src/test/resources/smoke/visibility/output/dart/lib/src/smoke/public_class.dart b/gluecodium/src/test/resources/smoke/visibility/output/dart/lib/src/smoke/public_class.dart index 9c6e175bec..164898d03d 100644 --- a/gluecodium/src/test/resources/smoke/visibility/output/dart/lib/src/smoke/public_class.dart +++ b/gluecodium/src/test/resources/smoke/visibility/output/dart/lib/src/smoke/public_class.dart @@ -3,13 +3,14 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; import 'package:meta/meta.dart'; abstract class PublicClass { /// @nodoc @Deprecated("Does nothing") void release(); /// @nodoc - PublicClass_InternalStruct internal_internalMethod(PublicClass_InternalStruct input); + PublicClass_InternalStructTypeDef internal_internalMethod(PublicClass_InternalStruct input); /// @nodoc @internal PublicClass_InternalStruct get internal_internalStructProperty; @@ -23,6 +24,15 @@ abstract class PublicClass { } /// @nodoc @internal +typedef internal_PublicClass_InternalArray = List; +/// @nodoc +@internal +typedef internal_PublicClass_InternalStructTypeDef = PublicClass_InternalStruct; +/// @nodoc +@internal +typedef internal_PublicClass_StringToInternalStructMap = Map; +/// @nodoc +@internal enum PublicClass_InternalEnum { foo, bar @@ -306,7 +316,7 @@ class PublicClass$Impl extends __lib.NativeBase implements PublicClass { @override void release() {} @override - PublicClass_InternalStruct internal_internalMethod(PublicClass_InternalStruct input) { + PublicClass_InternalStructTypeDef internal_internalMethod(PublicClass_InternalStruct input) { final _internalMethodFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_PublicClass_internalMethod__InternalStruct')); final _inputHandle = smokePublicclassInternalstructToFfi(input); final _handle = this.handle;