From 7d6f79c732539ed3e5ba42ae1d9b33ae8e954796 Mon Sep 17 00:00:00 2001 From: Rafal Parzych Date: Mon, 21 Aug 2023 15:56:37 +0200 Subject: [PATCH] duplicate_definition for internal classes with throwing constructors Added ffi prefix to name of functions handling error and return type retrival from throwing functions. This prevent duplicate_definition error if more than one class has those function inside one file, for example in case of multiple internall classes. Relates-To: #1547 Signed-off-by: Rafal Parzych --- .idea/kotlinc.xml | 3 + .../input/lime/StructsWithMethods.lime | 14 + .../input/src/cpp/StructsWithMethods.cpp | 14 + .../templates/dart/DartFunctionBody.mustache | 10 +- .../dart/DartFunctionException.mustache | 8 +- .../output/dart/lib/src/smoke/comments.dart | 20 +- .../dart/lib/src/smoke/comments_links.dart | 20 +- .../dart/lib/src/smoke/excluded_comments.dart | 22 +- .../lib/src/smoke/excluded_comments_only.dart | 22 +- .../dart/lib/src/smoke/platform_comments.dart | 22 +- .../dart/lib/src/smoke/unicode_comments.dart | 22 +- .../dart/lib/src/smoke/constructors.dart | 22 +- .../output/dart/lib/src/smoke/errors.dart | 82 ++-- .../dart/lib/src/smoke/errors_interface.dart | 83 ++-- .../output/dart/lib/src/package/class.dart | 20 +- .../dart/lib/src/smoke/outer_struct.dart | 16 +- .../dart/lib/src/smoke/use_free_types.dart | 22 +- .../lib/src/smoke/structs_with_methods.dart | 20 +- .../input/ThrowingConstructors.lime | 45 +++ .../dart/ffi/ffi_smoke_ExternalClass.cpp | 253 ++++++++++++ .../output/dart/ffi/ffi_smoke_ExternalClass.h | 110 ++++++ .../output/dart/lib/smoke.dart | 3 + .../dart/lib/src/smoke/external_class.dart | 368 ++++++++++++++++++ 23 files changed, 1007 insertions(+), 214 deletions(-) create mode 100644 gluecodium/src/test/resources/smoke/throwing_constructors/input/ThrowingConstructors.lime create mode 100644 gluecodium/src/test/resources/smoke/throwing_constructors/output/dart/ffi/ffi_smoke_ExternalClass.cpp create mode 100644 gluecodium/src/test/resources/smoke/throwing_constructors/output/dart/ffi/ffi_smoke_ExternalClass.h create mode 100644 gluecodium/src/test/resources/smoke/throwing_constructors/output/dart/lib/smoke.dart create mode 100644 gluecodium/src/test/resources/smoke/throwing_constructors/output/dart/lib/src/smoke/external_class.dart diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 27248dfed7..c49c8d4104 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -7,4 +7,7 @@