Skip to content

Commit bd7f7e1

Browse files
committed
Generate type aliases in Dart
Added dedicated DartTypeAlias template, as type aliases (typedefs) are now supported in Dart language (since Dart version 2.13). Updated other Dart tempates and resolvers to treat type aliases as a normal type, instead of skipping it through to the target type. Added/updated related smoke and functional tests. Unrelated smoke tests are updated in a separate commit. Resolves: #907 Signed-off-by: Daniel Kamkha <[email protected]>
1 parent 861ba70 commit bd7f7e1

File tree

16 files changed

+139
-40
lines changed

16 files changed

+139
-40
lines changed

.github/workflows/functional-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ jobs:
246246
- name: Install Dart SDK
247247
run: |
248248
DART_RELEASE_CHANNEL=stable
249-
DART_VERSION=2.12.0
249+
DART_VERSION=2.13.3
250250
wget -nv https://storage.googleapis.com/dart-archive/channels/${DART_RELEASE_CHANNEL}/release/${DART_VERSION}/linux_packages/dart_${DART_VERSION}-1_amd64.deb
251251
sudo apt -y install ./dart_${DART_VERSION}-1_amd64.deb
252252
- name: Build and run functional tests
@@ -363,7 +363,7 @@ jobs:
363363
- name: Install Dart SDK
364364
run: |
365365
DART_RELEASE_CHANNEL=stable
366-
DART_VERSION=2.12.0
366+
DART_VERSION=2.13.3
367367
wget -nv https://storage.googleapis.com/dart-archive/channels/${DART_RELEASE_CHANNEL}/release/${DART_VERSION}/linux_packages/dart_${DART_VERSION}-1_amd64.deb
368368
sudo apt -y install ./dart_${DART_VERSION}-1_amd64.deb
369369
- name: Build and run functional tests

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Gluecodium project Release Notes
22

3+
## Unreleased
4+
### Features:
5+
* Added support for type aliases (typedefs) in Dart
6+
### Breaking changes:
7+
* Generated Dart code now requires minimum Dart version 2.13.0.
8+
39
## Unreleased
410
### Removed:
511
* Support for `types` declaration was removed.

functional-tests/functional/dart/main.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ import "test/StaticIntMethods_test.dart" as StaticIntMethodsTests;
6969
import "test/StaticStringMethods_test.dart" as StaticStringMethodsTests;
7070
import "test/StructsWithConstants_test.dart" as StructsWithConstantsTests;
7171
import "test/StructsWithMethods_test.dart" as StructsWithMethodsTests;
72+
import "test/TypeAliases_test.dart" as TypeAliasesTests;
7273

7374
final _allTests = [
7475
AsyncTests.main,
@@ -117,7 +118,8 @@ final _allTests = [
117118
StaticIntMethodsTests.main,
118119
StaticStringMethodsTests.main,
119120
StructsWithConstantsTests.main,
120-
StructsWithMethodsTests.main
121+
StructsWithMethodsTests.main,
122+
TypeAliasesTests.main
121123
];
122124

123125
String _getLibraryPath(String nativeLibraryName) {

functional-tests/functional/dart/pubspec.yaml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: FunctionalDartTests
22
environment:
3-
sdk: '>=2.12.0 <3.0.0'
3+
sdk: '>=2.13.0 <3.0.0'
44
dependencies:
55
test:
66
functional:
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// -------------------------------------------------------------------------------------------------
2+
// Copyright (C) 2016-2021 HERE Europe B.V.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
// SPDX-License-Identifier: Apache-2.0
17+
// License-Filename: LICENSE
18+
//
19+
// -------------------------------------------------------------------------------------------------
20+
21+
import "package:test/test.dart";
22+
import "package:functional/test.dart";
23+
import "../test_suite.dart";
24+
25+
final _testSuite = TestSuite("Type Aliases");
26+
27+
void main() {
28+
_testSuite.test("Type alias to struct", () {
29+
final result = StaticTypedefExampleStructTypedef("nonsense");
30+
31+
expect(result is StaticTypedefExampleStruct, isTrue);
32+
expect(result.exampleString, "nonsense");
33+
});
34+
_testSuite.test("Type alias used by a function", () {
35+
final result = StaticTypedef.returnIntTypedef(2);
36+
37+
expect(result is int, isTrue);
38+
expect(result, 3);
39+
});
40+
_testSuite.test("Type alias points to a type alias", () {
41+
final result = StaticTypedef.returnNestedIntTypedef(4);
42+
43+
expect(result is int, isTrue);
44+
expect(result, 5);
45+
});
46+
_testSuite.test("Type alias from type collection", () {
47+
final result = StaticTypedef.returnTypedefPointFromTypeCollection(
48+
TypeCollectionPointTypedef(1.0, 3.0)
49+
);
50+
51+
expect(result is TypeCollectionPoint, isTrue);
52+
expect(result.x, 1.0);
53+
expect(result.y, 3.0);
54+
});
55+
}

functional-tests/functional/input/lime/StaticTypedef.lime

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class StaticTypedef {
2323
// Example struct
2424
struct ExampleStruct {
2525
exampleString: String = ""
26+
field constructor(exampleString)
2627
}
2728
typealias IntTypedef = Int
2829
typealias NestedIntTypedef = IntTypedef

gluecodium/src/main/java/com/here/gluecodium/generator/dart/DartGenerator.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ internal class DartGenerator : Generator {
179179
injectAsyncHelpers(ffiReferenceMap, asyncHelpers)
180180

181181
val generatedFiles = dartFilteredModel.topElements.flatMap {
182-
listOfNotNull(
182+
listOf(
183183
generateDart(
184184
it, dartResolvers, dartNameResolver, listOf(importsCollector, declarationImportsCollector),
185185
exportsCollector, typeRepositoriesCollector, predicatesMap, descendantInterfaces,
@@ -214,15 +214,15 @@ internal class DartGenerator : Generator {
214214
predicates: Map<String, (Any) -> Boolean>,
215215
descendantInterfaces: Map<String, List<LimeInterface>>,
216216
asyncHelpers: DartAsyncHelpers.AsyncHelpersGroup?
217-
): GeneratedFile? {
218-
val contentTemplateName = selectTemplate(rootElement) ?: return null
217+
): GeneratedFile {
218+
val contentTemplateName = selectTemplate(rootElement)
219219

220220
val packagePath = rootElement.path.head.joinToString(separator = "/")
221221
val fileName = dartNameResolver.resolveFileName(rootElement)
222222
val filePath = "$packagePath/$fileName"
223223
val relativePath = "$SRC_DIR_SUFFIX/$filePath.dart"
224224

225-
val allTypes = LimeTypeHelper.getAllTypes(rootElement).filterNot { it is LimeTypeAlias }
225+
val allTypes = LimeTypeHelper.getAllTypes(rootElement)
226226
val nonExternalTypes = allTypes.filter { it.external?.dart == null }
227227
val allSymbols = nonExternalTypes.filter { it.visibility.isPublic }
228228
if (allSymbols.isNotEmpty()) {
@@ -527,7 +527,7 @@ internal class DartGenerator : Generator {
527527
is LimeEnumeration -> "dart/DartEnumeration"
528528
is LimeException -> "dart/DartException"
529529
is LimeLambda -> "dart/DartLambda"
530-
is LimeTypeAlias -> null
530+
is LimeTypeAlias -> "dart/DartTypeAlias"
531531
else -> throw GluecodiumExecutionException(
532532
"Unsupported top-level element: " +
533533
limeElement::class.java.name

gluecodium/src/main/java/com/here/gluecodium/generator/dart/DartImportResolver.kt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,16 @@ internal class DartImportResolver(
5656
}
5757

5858
private fun resolveTypeImports(limeType: LimeType, skipHelpers: Boolean = false): List<DartImport> {
59-
val actualType = limeType.actualType
60-
when (actualType) {
61-
is LimeBasicType -> return resolveBasicTypeImports(actualType)
62-
is LimeGenericType -> return resolveGenericTypeImports(actualType)
59+
when (limeType) {
60+
is LimeBasicType -> return resolveBasicTypeImports(limeType)
61+
is LimeGenericType -> return resolveGenericTypeImports(limeType)
6362
}
6463

65-
val externalImport = resolveExternalImport(actualType, IMPORT_PATH_NAME, useAlias = true)
64+
val externalImport = resolveExternalImport(limeType, IMPORT_PATH_NAME, useAlias = true)
6665
return when {
67-
externalImport == null -> listOf(createImport(actualType))
66+
externalImport == null -> listOf(createImport(limeType))
6867
skipHelpers -> listOf(externalImport)
69-
else -> listOf(createImport(actualType), externalImport)
68+
else -> listOf(createImport(limeType), externalImport)
7069
}
7170
}
7271

gluecodium/src/main/java/com/here/gluecodium/generator/dart/DartImportsCollector.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ internal class DartImportsCollector(importsResolver: ImportsResolver<DartImport>
2929
importsResolver,
3030
collectTypeRefImports = true,
3131
collectValueImports = true,
32-
parentTypeFilter = { true }
32+
parentTypeFilter = { true },
33+
collectTypeAliasImports = true
3334
) {
3435

3536
override fun collectParentTypeRefs(limeContainer: LimeContainerWithInheritance) =

gluecodium/src/main/java/com/here/gluecodium/generator/dart/DartNameResolver.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ import com.here.gluecodium.model.lime.LimeReturnType
4848
import com.here.gluecodium.model.lime.LimeSet
4949
import com.here.gluecodium.model.lime.LimeStruct
5050
import com.here.gluecodium.model.lime.LimeType
51-
import com.here.gluecodium.model.lime.LimeTypeAlias
5251
import com.here.gluecodium.model.lime.LimeTypeHelper
5352
import com.here.gluecodium.model.lime.LimeTypeRef
5453
import com.here.gluecodium.model.lime.LimeValue
@@ -85,7 +84,6 @@ internal class DartNameResolver(
8584
is LimeValue -> resolveValue(element)
8685
is LimeGenericType -> resolveGenericType(element)
8786
is LimeTypeRef -> resolveTypeRefName(element)
88-
is LimeTypeAlias -> resolveName(element.typeRef)
8987
is LimeType -> resolveTypeName(element)
9088
is LimeNamedElement -> getPlatformName(element)
9189
else ->
@@ -269,11 +267,11 @@ internal class DartNameResolver(
269267

270268
private fun resolveTypeRefName(limeTypeRef: LimeTypeRef, ignoreDuplicates: Boolean = false): String {
271269
val typeName = resolveName(limeTypeRef.type)
272-
val importPath = limeTypeRef.type.actualType.external?.dart?.get(IMPORT_PATH_NAME)
270+
val importPath = limeTypeRef.type.external?.dart?.get(IMPORT_PATH_NAME)
273271
val alias = when {
274272
importPath != null -> computeAlias(importPath)
275273
ignoreDuplicates -> null
276-
duplicateNames.contains(typeName) -> limeTypeRef.type.actualType.path.head.joinToString("_")
274+
duplicateNames.contains(typeName) -> limeTypeRef.type.path.head.joinToString("_")
277275
else -> null
278276
}
279277
val suffix = if (limeTypeRef.isNullable) "?" else ""
@@ -311,7 +309,7 @@ internal class DartNameResolver(
311309
private fun buildDuplicateNames() =
312310
limeReferenceMap.values
313311
.filterIsInstance<LimeType>()
314-
.filterNot { it is LimeTypeAlias || it is LimeGenericType || it is LimeBasicType }
312+
.filterNot { it is LimeGenericType || it is LimeBasicType }
315313
.filter { it.external?.dart == null }
316314
.groupBy { resolveTypeName(it) }
317315
.filterValues { it.size > 1 }

gluecodium/src/main/resources/templates/dart/DartClass.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ abstract class {{resolveName}}{{!!
4545
{{/ifPredicate}}
4646
}
4747

48+
{{#typeAliases}}
49+
{{>dart/DartTypeAlias}}
50+
{{/typeAliases}}
4851
{{#enumerations}}
4952
{{>dart/DartEnumeration}}
5053
{{/enumerations}}

gluecodium/src/main/resources/templates/dart/DartInterface.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ abstract class {{resolveName}}{{!!
6161
{{/ifPredicate}}
6262
}
6363

64+
{{#typeAliases}}
65+
{{>dart/DartTypeAlias}}
66+
{{/typeAliases}}
6467
{{#enumerations}}
6568
{{>dart/DartEnumeration}}
6669
{{/enumerations}}

gluecodium/src/main/resources/templates/dart/DartPubspec.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
!}}
2121
name: {{libraryName}}
2222
environment:
23-
sdk: '>=2.12.0 <3.0.0'
23+
sdk: '>=2.13.0 <3.0.0'
2424
dependencies:
2525
ffi:
2626
intl:

gluecodium/src/main/resources/templates/dart/DartStruct.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ class {{resolveName}}{{#if external.dart.converter}}Internal{{/if}} {
7070
}
7171
{{/unlessPredicate}}
7272

73+
{{#typeAliases}}
74+
{{>dart/DartTypeAlias}}
75+
{{/typeAliases}}
7376
{{#enumerations}}
7477
{{>dart/DartEnumeration}}
7578
{{/enumerations}}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{!!
2+
!
3+
! Copyright (C) 2016-2021 HERE Europe B.V.
4+
!
5+
! Licensed under the Apache License, Version 2.0 (the "License");
6+
! you may not use this file except in compliance with the License.
7+
! You may obtain a copy of the License at
8+
!
9+
! http://www.apache.org/licenses/LICENSE-2.0
10+
!
11+
! Unless required by applicable law or agreed to in writing, software
12+
! distributed under the License is distributed on an "AS IS" BASIS,
13+
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
! See the License for the specific language governing permissions and
15+
! limitations under the License.
16+
!
17+
! SPDX-License-Identifier: Apache-2.0
18+
! License-Filename: LICENSE
19+
!
20+
!}}
21+
{{>dart/DartDocumentation}}{{>dart/DartAttributes}}
22+
typedef {{resolveName visibility}}{{resolveName}} = {{resolveName typeRef}};

gluecodium/src/test/resources/smoke/typedefs/output/dart/lib/src/smoke/type_defs.dart

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,26 @@ import 'package:library/src/generic_types__conversion.dart';
77
import 'package:library/src/smoke/type_collection.dart';
88
import 'package:meta/meta.dart';
99
abstract class TypeDefs {
10-
static double methodWithPrimitiveTypeDef(double input) => $prototype.methodWithPrimitiveTypeDef(input);
11-
static List<TypeDefs_TestStruct> methodWithComplexTypeDef(List<TypeDefs_TestStruct> input) => $prototype.methodWithComplexTypeDef(input);
12-
static double returnNestedIntTypeDef(double input) => $prototype.returnNestedIntTypeDef(input);
13-
static TypeDefs_TestStruct returnTestStructTypeDef(TypeDefs_TestStruct input) => $prototype.returnTestStructTypeDef(input);
14-
static TypeDefs_TestStruct returnNestedStructTypeDef(TypeDefs_TestStruct input) => $prototype.returnNestedStructTypeDef(input);
15-
static TypeCollection_Point returnTypeDefPointFromTypeCollection(TypeCollection_Point input) => $prototype.returnTypeDefPointFromTypeCollection(input);
16-
List<double> get primitiveTypeProperty;
17-
set primitiveTypeProperty(List<double> value);
10+
static TypeDefs_PrimitiveTypeDef methodWithPrimitiveTypeDef(TypeDefs_PrimitiveTypeDef input) => $prototype.methodWithPrimitiveTypeDef(input);
11+
static TypeDefs_ComplexTypeDef methodWithComplexTypeDef(TypeDefs_ComplexTypeDef input) => $prototype.methodWithComplexTypeDef(input);
12+
static TypeDefs_NestedIntTypeDef returnNestedIntTypeDef(TypeDefs_NestedIntTypeDef input) => $prototype.returnNestedIntTypeDef(input);
13+
static TypeDefs_TestStructTypeDef returnTestStructTypeDef(TypeDefs_TestStructTypeDef input) => $prototype.returnTestStructTypeDef(input);
14+
static TypeDefs_NestedStructTypeDef returnNestedStructTypeDef(TypeDefs_NestedStructTypeDef input) => $prototype.returnNestedStructTypeDef(input);
15+
static PointTypeDef returnTypeDefPointFromTypeCollection(PointTypeDef input) => $prototype.returnTypeDefPointFromTypeCollection(input);
16+
List<TypeDefs_PrimitiveTypeDef> get primitiveTypeProperty;
17+
set primitiveTypeProperty(List<TypeDefs_PrimitiveTypeDef> value);
1818
/// @nodoc
1919
@visibleForTesting
2020
static dynamic $prototype = TypeDefs$Impl(Pointer<Void>.fromAddress(0));
2121
}
22+
typedef TypeDefs_NestedIntTypeDef = TypeDefs_PrimitiveTypeDef;
23+
typedef TypeDefs_PrimitiveTypeDef = double;
24+
typedef TypeDefs_StructArray = List<TypeDefs_TestStruct>;
25+
typedef TypeDefs_ComplexTypeDef = TypeDefs_StructArray;
26+
typedef TypeDefs_TestStructTypeDef = TypeDefs_TestStruct;
27+
typedef TypeDefs_NestedStructTypeDef = TypeDefs_TestStructTypeDef;
2228
class TypeDefs_StructHavingAliasFieldDefinedBelow {
23-
double field;
29+
TypeDefs_PrimitiveTypeDef field;
2430
TypeDefs_StructHavingAliasFieldDefinedBelow(this.field);
2531
}
2632
// TypeDefs_StructHavingAliasFieldDefinedBelow "private" section, not exported.
@@ -162,7 +168,7 @@ final _smokeTypedefsReleaseHandle = __lib.catchArgumentError(() => __lib.nativeL
162168
@visibleForTesting
163169
class TypeDefs$Impl extends __lib.NativeBase implements TypeDefs {
164170
TypeDefs$Impl(Pointer<Void> handle) : super(handle);
165-
double methodWithPrimitiveTypeDef(double input) {
171+
TypeDefs_PrimitiveTypeDef methodWithPrimitiveTypeDef(TypeDefs_PrimitiveTypeDef input) {
166172
final _methodWithPrimitiveTypeDefFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Double Function(Int32, Double), double Function(int, double)>('library_smoke_TypeDefs_methodWithPrimitiveTypeDef__Double'));
167173
final _inputHandle = (input);
168174
final __resultHandle = _methodWithPrimitiveTypeDefFfi(__lib.LibraryContext.isolateId, _inputHandle);
@@ -171,7 +177,7 @@ class TypeDefs$Impl extends __lib.NativeBase implements TypeDefs {
171177
} finally {
172178
}
173179
}
174-
List<TypeDefs_TestStruct> methodWithComplexTypeDef(List<TypeDefs_TestStruct> input) {
180+
TypeDefs_ComplexTypeDef methodWithComplexTypeDef(TypeDefs_ComplexTypeDef input) {
175181
final _methodWithComplexTypeDefFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Pointer<Void> Function(Int32, Pointer<Void>), Pointer<Void> Function(int, Pointer<Void>)>('library_smoke_TypeDefs_methodWithComplexTypeDef__ListOf_smoke_TypeDefs_TestStruct'));
176182
final _inputHandle = foobarListofSmokeTypedefsTeststructToFfi(input);
177183
final __resultHandle = _methodWithComplexTypeDefFfi(__lib.LibraryContext.isolateId, _inputHandle);
@@ -182,7 +188,7 @@ class TypeDefs$Impl extends __lib.NativeBase implements TypeDefs {
182188
foobarListofSmokeTypedefsTeststructReleaseFfiHandle(__resultHandle);
183189
}
184190
}
185-
double returnNestedIntTypeDef(double input) {
191+
TypeDefs_NestedIntTypeDef returnNestedIntTypeDef(TypeDefs_NestedIntTypeDef input) {
186192
final _returnNestedIntTypeDefFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Double Function(Int32, Double), double Function(int, double)>('library_smoke_TypeDefs_returnNestedIntTypeDef__Double'));
187193
final _inputHandle = (input);
188194
final __resultHandle = _returnNestedIntTypeDefFfi(__lib.LibraryContext.isolateId, _inputHandle);
@@ -191,7 +197,7 @@ class TypeDefs$Impl extends __lib.NativeBase implements TypeDefs {
191197
} finally {
192198
}
193199
}
194-
TypeDefs_TestStruct returnTestStructTypeDef(TypeDefs_TestStruct input) {
200+
TypeDefs_TestStructTypeDef returnTestStructTypeDef(TypeDefs_TestStructTypeDef input) {
195201
final _returnTestStructTypeDefFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Pointer<Void> Function(Int32, Pointer<Void>), Pointer<Void> Function(int, Pointer<Void>)>('library_smoke_TypeDefs_returnTestStructTypeDef__TestStruct'));
196202
final _inputHandle = smokeTypedefsTeststructToFfi(input);
197203
final __resultHandle = _returnTestStructTypeDefFfi(__lib.LibraryContext.isolateId, _inputHandle);
@@ -202,7 +208,7 @@ class TypeDefs$Impl extends __lib.NativeBase implements TypeDefs {
202208
smokeTypedefsTeststructReleaseFfiHandle(__resultHandle);
203209
}
204210
}
205-
TypeDefs_TestStruct returnNestedStructTypeDef(TypeDefs_TestStruct input) {
211+
TypeDefs_NestedStructTypeDef returnNestedStructTypeDef(TypeDefs_NestedStructTypeDef input) {
206212
final _returnNestedStructTypeDefFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Pointer<Void> Function(Int32, Pointer<Void>), Pointer<Void> Function(int, Pointer<Void>)>('library_smoke_TypeDefs_returnNestedStructTypeDef__TestStruct'));
207213
final _inputHandle = smokeTypedefsTeststructToFfi(input);
208214
final __resultHandle = _returnNestedStructTypeDefFfi(__lib.LibraryContext.isolateId, _inputHandle);
@@ -213,7 +219,7 @@ class TypeDefs$Impl extends __lib.NativeBase implements TypeDefs {
213219
smokeTypedefsTeststructReleaseFfiHandle(__resultHandle);
214220
}
215221
}
216-
TypeCollection_Point returnTypeDefPointFromTypeCollection(TypeCollection_Point input) {
222+
PointTypeDef returnTypeDefPointFromTypeCollection(PointTypeDef input) {
217223
final _returnTypeDefPointFromTypeCollectionFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Pointer<Void> Function(Int32, Pointer<Void>), Pointer<Void> Function(int, Pointer<Void>)>('library_smoke_TypeDefs_returnTypeDefPointFromTypeCollection__Point'));
218224
final _inputHandle = smokeTypecollectionPointToFfi(input);
219225
final __resultHandle = _returnTypeDefPointFromTypeCollectionFfi(__lib.LibraryContext.isolateId, _inputHandle);
@@ -225,7 +231,7 @@ class TypeDefs$Impl extends __lib.NativeBase implements TypeDefs {
225231
}
226232
}
227233
@override
228-
List<double> get primitiveTypeProperty {
234+
List<TypeDefs_PrimitiveTypeDef> get primitiveTypeProperty {
229235
final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Pointer<Void> Function(Pointer<Void>, Int32), Pointer<Void> Function(Pointer<Void>, int)>('library_smoke_TypeDefs_primitiveTypeProperty_get'));
230236
final _handle = this.handle;
231237
final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId);
@@ -236,7 +242,7 @@ class TypeDefs$Impl extends __lib.NativeBase implements TypeDefs {
236242
}
237243
}
238244
@override
239-
set primitiveTypeProperty(List<double> value) {
245+
set primitiveTypeProperty(List<TypeDefs_PrimitiveTypeDef> value) {
240246
final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Void Function(Pointer<Void>, Int32, Pointer<Void>), void Function(Pointer<Void>, int, Pointer<Void>)>('library_smoke_TypeDefs_primitiveTypeProperty_set__ListOf_Double'));
241247
final _valueHandle = foobarListofDoubleToFfi(value);
242248
final _handle = this.handle;

0 commit comments

Comments
 (0)