[3.0 alpha] Use equals for default values in the SDK
The colons cause test failures when the language version is bumped to 3.0. This CL can be landed before the 3.0 version bump.
Bug: https://github.com/dart-lang/language/issues/2357
Change-Id: Id8396034b16adc18b476689314e28b9617d25f18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272200
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
diff --git a/benchmarks/FfiCall/dart/FfiCall.dart b/benchmarks/FfiCall/dart/FfiCall.dart
index 517329a..da9a67d 100644
--- a/benchmarks/FfiCall/dart/FfiCall.dart
+++ b/benchmarks/FfiCall/dart/FfiCall.dart
@@ -285,7 +285,7 @@
abstract class FfiBenchmarkBase extends BenchmarkBase {
final bool isLeaf;
- FfiBenchmarkBase(String name, {this.isLeaf: false})
+ FfiBenchmarkBase(String name, {this.isLeaf = false})
: super('$name${isLeaf ? 'Leaf' : ''}');
void expectEquals(actual, expected) {
@@ -310,7 +310,7 @@
class Uint8x01 extends FfiBenchmarkBase {
final Function1int f;
- Uint8x01({isLeaf: false})
+ Uint8x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Uint8,
Function1int>('Function1Uint8', isLeaf: true)
@@ -331,7 +331,7 @@
class Uint16x01 extends FfiBenchmarkBase {
final Function1int f;
- Uint16x01({isLeaf: false})
+ Uint16x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Uint16,
Function1int>('Function1Uint16', isLeaf: true)
@@ -352,7 +352,7 @@
class Uint32x01 extends FfiBenchmarkBase {
final Function1int f;
- Uint32x01({isLeaf: false})
+ Uint32x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Uint32,
Function1int>('Function1Uint32', isLeaf: true)
@@ -373,7 +373,7 @@
class Uint64x01 extends FfiBenchmarkBase {
final Function1int f;
- Uint64x01({isLeaf: false})
+ Uint64x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Uint64,
Function1int>('Function1Uint64', isLeaf: true)
@@ -394,7 +394,7 @@
class Int8x01 extends FfiBenchmarkBase {
final Function1int f;
- Int8x01({isLeaf: false})
+ Int8x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Int8,
Function1int>('Function1Int8', isLeaf: true)
@@ -415,7 +415,7 @@
class Int16x01 extends FfiBenchmarkBase {
final Function1int f;
- Int16x01({isLeaf: false})
+ Int16x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Int16,
Function1int>('Function1Int16', isLeaf: true)
@@ -436,7 +436,7 @@
class Int32x01 extends FfiBenchmarkBase {
final Function1int f;
- Int32x01({isLeaf: false})
+ Int32x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Int32,
Function1int>('Function1Int32', isLeaf: true)
@@ -457,7 +457,7 @@
class Int32x02 extends FfiBenchmarkBase {
final Function2int f;
- Int32x02({isLeaf: false})
+ Int32x02({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction2Int32,
Function2int>('Function2Int32', isLeaf: true)
@@ -478,7 +478,7 @@
class Int32x04 extends FfiBenchmarkBase {
final Function4int f;
- Int32x04({isLeaf: false})
+ Int32x04({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction4Int32,
Function4int>('Function4Int32', isLeaf: true)
@@ -499,7 +499,7 @@
class Int32x10 extends FfiBenchmarkBase {
final Function10int f;
- Int32x10({isLeaf: false})
+ Int32x10({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction10Int32,
Function10int>('Function10Int32', isLeaf: true)
@@ -520,7 +520,7 @@
class Int32x20 extends FfiBenchmarkBase {
final Function20int f;
- Int32x20({isLeaf: false})
+ Int32x20({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction20Int32,
Function20int>('Function20Int32', isLeaf: true)
@@ -541,7 +541,7 @@
class Int64x01 extends FfiBenchmarkBase {
final Function1int f;
- Int64x01({isLeaf: false})
+ Int64x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Int64,
Function1int>('Function1Int64', isLeaf: true)
@@ -562,7 +562,7 @@
class Int64x02 extends FfiBenchmarkBase {
final Function2int f;
- Int64x02({isLeaf: false})
+ Int64x02({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction2Int64,
Function2int>('Function2Int64', isLeaf: true)
@@ -583,7 +583,7 @@
class Int64x04 extends FfiBenchmarkBase {
final Function4int f;
- Int64x04({isLeaf: false})
+ Int64x04({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction4Int64,
Function4int>('Function4Int64', isLeaf: true)
@@ -604,7 +604,7 @@
class Int64x10 extends FfiBenchmarkBase {
final Function10int f;
- Int64x10({isLeaf: false})
+ Int64x10({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction10Int64,
Function10int>('Function10Int64', isLeaf: true)
@@ -625,7 +625,7 @@
class Int64x20 extends FfiBenchmarkBase {
final Function20int f;
- Int64x20({isLeaf: false})
+ Int64x20({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction20Int64,
Function20int>('Function20Int64', isLeaf: true)
@@ -646,7 +646,7 @@
class Int64Mintx01 extends FfiBenchmarkBase {
final Function1int f;
- Int64Mintx01({isLeaf: false})
+ Int64Mintx01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Int64,
Function1int>('Function1Int64', isLeaf: true)
@@ -667,7 +667,7 @@
class Floatx01 extends FfiBenchmarkBase {
final Function1double f;
- Floatx01({isLeaf: false})
+ Floatx01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Float,
Function1double>('Function1Float', isLeaf: true)
@@ -688,7 +688,7 @@
class Floatx02 extends FfiBenchmarkBase {
final Function2double f;
- Floatx02({isLeaf: false})
+ Floatx02({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction2Float,
Function2double>('Function2Float', isLeaf: true)
@@ -709,7 +709,7 @@
class Floatx04 extends FfiBenchmarkBase {
final Function4double f;
- Floatx04({isLeaf: false})
+ Floatx04({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction4Float,
Function4double>('Function4Float', isLeaf: true)
@@ -731,7 +731,7 @@
class Floatx10 extends FfiBenchmarkBase {
final Function10double f;
- Floatx10({isLeaf: false})
+ Floatx10({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction10Float,
Function10double>('Function10Float', isLeaf: true)
@@ -754,7 +754,7 @@
class Floatx20 extends FfiBenchmarkBase {
final Function20double f;
- Floatx20({isLeaf: false})
+ Floatx20({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction20Float,
Function20double>('Function20Float', isLeaf: true)
@@ -797,7 +797,7 @@
class Doublex01 extends FfiBenchmarkBase {
final Function1double f;
- Doublex01({isLeaf: false})
+ Doublex01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Double,
Function1double>('Function1Double', isLeaf: true)
@@ -819,7 +819,7 @@
class Doublex02 extends FfiBenchmarkBase {
final Function2double f;
- Doublex02({isLeaf: false})
+ Doublex02({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction2Double,
Function2double>('Function2Double', isLeaf: true)
@@ -841,7 +841,7 @@
class Doublex04 extends FfiBenchmarkBase {
final Function4double f;
- Doublex04({isLeaf: false})
+ Doublex04({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction4Double,
Function4double>('Function4Double', isLeaf: true)
@@ -863,7 +863,7 @@
class Doublex10 extends FfiBenchmarkBase {
final Function10double f;
- Doublex10({isLeaf: false})
+ Doublex10({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction10Double,
Function10double>('Function10Double', isLeaf: true)
@@ -886,7 +886,7 @@
class Doublex20 extends FfiBenchmarkBase {
final Function20double f;
- Doublex20({isLeaf: false})
+ Doublex20({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction20Double,
Function20double>('Function20Double', isLeaf: true)
@@ -929,7 +929,7 @@
class PointerUint8x01 extends FfiBenchmarkBase {
final Function1PointerUint8 f;
- PointerUint8x01({isLeaf: false})
+ PointerUint8x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<Function1PointerUint8,
Function1PointerUint8>('Function1PointerUint8', isLeaf: true)
@@ -956,7 +956,7 @@
class PointerUint8x02 extends FfiBenchmarkBase {
final Function2PointerUint8 f;
- PointerUint8x02({isLeaf: false})
+ PointerUint8x02({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<Function2PointerUint8,
Function2PointerUint8>('Function2PointerUint8', isLeaf: true)
@@ -991,7 +991,7 @@
class PointerUint8x04 extends FfiBenchmarkBase {
final Function4PointerUint8 f;
- PointerUint8x04({isLeaf: false})
+ PointerUint8x04({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<Function4PointerUint8,
Function4PointerUint8>('Function4PointerUint8', isLeaf: true)
@@ -1030,7 +1030,7 @@
class PointerUint8x10 extends FfiBenchmarkBase {
final Function10PointerUint8 f;
- PointerUint8x10({isLeaf: false})
+ PointerUint8x10({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<Function10PointerUint8,
Function10PointerUint8>('Function10PointerUint8', isLeaf: true)
@@ -1083,7 +1083,7 @@
class PointerUint8x20 extends FfiBenchmarkBase {
final Function20PointerUint8 f;
- PointerUint8x20({isLeaf: false})
+ PointerUint8x20({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<Function20PointerUint8,
Function20PointerUint8>('Function20PointerUint8', isLeaf: true)
diff --git a/benchmarks/FfiCall/dart2/FfiCall.dart b/benchmarks/FfiCall/dart2/FfiCall.dart
index a1ada52..34cd6e1 100644
--- a/benchmarks/FfiCall/dart2/FfiCall.dart
+++ b/benchmarks/FfiCall/dart2/FfiCall.dart
@@ -312,7 +312,7 @@
class Uint8x01 extends FfiBenchmarkBase {
final Function1int f;
- Uint8x01({isLeaf: false})
+ Uint8x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Uint8,
Function1int>('Function1Uint8', isLeaf: true)
@@ -333,7 +333,7 @@
class Uint16x01 extends FfiBenchmarkBase {
final Function1int f;
- Uint16x01({isLeaf: false})
+ Uint16x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Uint16,
Function1int>('Function1Uint16', isLeaf: true)
@@ -354,7 +354,7 @@
class Uint32x01 extends FfiBenchmarkBase {
final Function1int f;
- Uint32x01({isLeaf: false})
+ Uint32x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Uint32,
Function1int>('Function1Uint32', isLeaf: true)
@@ -375,7 +375,7 @@
class Uint64x01 extends FfiBenchmarkBase {
final Function1int f;
- Uint64x01({isLeaf: false})
+ Uint64x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Uint64,
Function1int>('Function1Uint64', isLeaf: true)
@@ -396,7 +396,7 @@
class Int8x01 extends FfiBenchmarkBase {
final Function1int f;
- Int8x01({isLeaf: false})
+ Int8x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Int8,
Function1int>('Function1Int8', isLeaf: true)
@@ -417,7 +417,7 @@
class Int16x01 extends FfiBenchmarkBase {
final Function1int f;
- Int16x01({isLeaf: false})
+ Int16x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Int16,
Function1int>('Function1Int16', isLeaf: true)
@@ -438,7 +438,7 @@
class Int32x01 extends FfiBenchmarkBase {
final Function1int f;
- Int32x01({isLeaf: false})
+ Int32x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Int32,
Function1int>('Function1Int32', isLeaf: true)
@@ -459,7 +459,7 @@
class Int32x02 extends FfiBenchmarkBase {
final Function2int f;
- Int32x02({isLeaf: false})
+ Int32x02({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction2Int32,
Function2int>('Function2Int32', isLeaf: true)
@@ -480,7 +480,7 @@
class Int32x04 extends FfiBenchmarkBase {
final Function4int f;
- Int32x04({isLeaf: false})
+ Int32x04({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction4Int32,
Function4int>('Function4Int32', isLeaf: true)
@@ -501,7 +501,7 @@
class Int32x10 extends FfiBenchmarkBase {
final Function10int f;
- Int32x10({isLeaf: false})
+ Int32x10({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction10Int32,
Function10int>('Function10Int32', isLeaf: true)
@@ -522,7 +522,7 @@
class Int32x20 extends FfiBenchmarkBase {
final Function20int f;
- Int32x20({isLeaf: false})
+ Int32x20({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction20Int32,
Function20int>('Function20Int32', isLeaf: true)
@@ -543,7 +543,7 @@
class Int64x01 extends FfiBenchmarkBase {
final Function1int f;
- Int64x01({isLeaf: false})
+ Int64x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Int64,
Function1int>('Function1Int64', isLeaf: true)
@@ -564,7 +564,7 @@
class Int64x02 extends FfiBenchmarkBase {
final Function2int f;
- Int64x02({isLeaf: false})
+ Int64x02({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction2Int64,
Function2int>('Function2Int64', isLeaf: true)
@@ -585,7 +585,7 @@
class Int64x04 extends FfiBenchmarkBase {
final Function4int f;
- Int64x04({isLeaf: false})
+ Int64x04({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction4Int64,
Function4int>('Function4Int64', isLeaf: true)
@@ -606,7 +606,7 @@
class Int64x10 extends FfiBenchmarkBase {
final Function10int f;
- Int64x10({isLeaf: false})
+ Int64x10({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction10Int64,
Function10int>('Function10Int64', isLeaf: true)
@@ -627,7 +627,7 @@
class Int64x20 extends FfiBenchmarkBase {
final Function20int f;
- Int64x20({isLeaf: false})
+ Int64x20({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction20Int64,
Function20int>('Function20Int64', isLeaf: true)
@@ -648,7 +648,7 @@
class Int64Mintx01 extends FfiBenchmarkBase {
final Function1int f;
- Int64Mintx01({isLeaf: false})
+ Int64Mintx01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Int64,
Function1int>('Function1Int64', isLeaf: true)
@@ -669,7 +669,7 @@
class Floatx01 extends FfiBenchmarkBase {
final Function1double f;
- Floatx01({isLeaf: false})
+ Floatx01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Float,
Function1double>('Function1Float', isLeaf: true)
@@ -690,7 +690,7 @@
class Floatx02 extends FfiBenchmarkBase {
final Function2double f;
- Floatx02({isLeaf: false})
+ Floatx02({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction2Float,
Function2double>('Function2Float', isLeaf: true)
@@ -711,7 +711,7 @@
class Floatx04 extends FfiBenchmarkBase {
final Function4double f;
- Floatx04({isLeaf: false})
+ Floatx04({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction4Float,
Function4double>('Function4Float', isLeaf: true)
@@ -733,7 +733,7 @@
class Floatx10 extends FfiBenchmarkBase {
final Function10double f;
- Floatx10({isLeaf: false})
+ Floatx10({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction10Float,
Function10double>('Function10Float', isLeaf: true)
@@ -756,7 +756,7 @@
class Floatx20 extends FfiBenchmarkBase {
final Function20double f;
- Floatx20({isLeaf: false})
+ Floatx20({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction20Float,
Function20double>('Function20Float', isLeaf: true)
@@ -799,7 +799,7 @@
class Doublex01 extends FfiBenchmarkBase {
final Function1double f;
- Doublex01({isLeaf: false})
+ Doublex01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction1Double,
Function1double>('Function1Double', isLeaf: true)
@@ -821,7 +821,7 @@
class Doublex02 extends FfiBenchmarkBase {
final Function2double f;
- Doublex02({isLeaf: false})
+ Doublex02({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction2Double,
Function2double>('Function2Double', isLeaf: true)
@@ -843,7 +843,7 @@
class Doublex04 extends FfiBenchmarkBase {
final Function4double f;
- Doublex04({isLeaf: false})
+ Doublex04({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction4Double,
Function4double>('Function4Double', isLeaf: true)
@@ -865,7 +865,7 @@
class Doublex10 extends FfiBenchmarkBase {
final Function10double f;
- Doublex10({isLeaf: false})
+ Doublex10({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction10Double,
Function10double>('Function10Double', isLeaf: true)
@@ -888,7 +888,7 @@
class Doublex20 extends FfiBenchmarkBase {
final Function20double f;
- Doublex20({isLeaf: false})
+ Doublex20({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<NativeFunction20Double,
Function20double>('Function20Double', isLeaf: true)
@@ -931,7 +931,7 @@
class PointerUint8x01 extends FfiBenchmarkBase {
final Function1PointerUint8 f;
- PointerUint8x01({isLeaf: false})
+ PointerUint8x01({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<Function1PointerUint8,
Function1PointerUint8>('Function1PointerUint8', isLeaf: true)
@@ -958,7 +958,7 @@
class PointerUint8x02 extends FfiBenchmarkBase {
final Function2PointerUint8 f;
- PointerUint8x02({isLeaf: false})
+ PointerUint8x02({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<Function2PointerUint8,
Function2PointerUint8>('Function2PointerUint8', isLeaf: true)
@@ -992,7 +992,7 @@
class PointerUint8x04 extends FfiBenchmarkBase {
final Function4PointerUint8 f;
- PointerUint8x04({isLeaf: false})
+ PointerUint8x04({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<Function4PointerUint8,
Function4PointerUint8>('Function4PointerUint8', isLeaf: true)
@@ -1028,7 +1028,7 @@
class PointerUint8x10 extends FfiBenchmarkBase {
final Function10PointerUint8 f;
- PointerUint8x10({isLeaf: false})
+ PointerUint8x10({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<Function10PointerUint8,
Function10PointerUint8>('Function10PointerUint8', isLeaf: true)
@@ -1072,7 +1072,7 @@
class PointerUint8x20 extends FfiBenchmarkBase {
final Function20PointerUint8 f;
- PointerUint8x20({isLeaf: false})
+ PointerUint8x20({isLeaf = false})
: f = isLeaf
? ffiTestFunctions.lookupFunction<Function20PointerUint8,
Function20PointerUint8>('Function20PointerUint8', isLeaf: true)
diff --git a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
index af298ba..7d52674 100644
--- a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
+++ b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
@@ -294,7 +294,7 @@
abstract class bool extends Object {
external const factory bool.fromEnvironment(String name,
- {bool defaultValue: false});
+ {bool defaultValue = false});
external const factory bool.hasEnvironment(String name);
@@ -754,7 +754,7 @@
extension NativeFunctionPointer<NF extends Function>
on Pointer<NativeFunction<NF>> {
- external DF asFunction<DF extends Function>({bool isLeaf:false});
+ external DF asFunction<DF extends Function>({bool isLeaf = false});
}
class _Compound extends NativeType {}
@@ -824,7 +824,7 @@
class FfiNative<T> {
final String nativeName;
final bool isLeaf;
- const FfiNative(this.nativeName, {this.isLeaf: false});
+ const FfiNative(this.nativeName, {this.isLeaf = false});
}
class Native<T> {
@@ -1206,7 +1206,8 @@
static Future<FileSystemEntityType> type(String path,
{bool followLinks: true}) =>
throw 0;
- static FileSystemEntityType typeSync(String path, {bool followLinks: true}) =>
+ static FileSystemEntityType typeSync(String path,
+ {bool followLinks = true}) =>
throw 0;
}
diff --git a/tests/ffi/callback_tests_utils.dart b/tests/ffi/callback_tests_utils.dart
index 3f5fed8..769d9ab 100644
--- a/tests/ffi/callback_tests_utils.dart
+++ b/tests/ffi/callback_tests_utils.dart
@@ -19,10 +19,10 @@
final void Function() afterCallbackChecks;
final bool isLeaf;
- CallbackTest(this.name, this.callback, {this.isLeaf: false})
+ CallbackTest(this.name, this.callback, {this.isLeaf = false})
: afterCallbackChecks = noChecks {}
CallbackTest.withCheck(this.name, this.callback, this.afterCallbackChecks,
- {this.isLeaf: false}) {}
+ {this.isLeaf = false}) {}
void run() {
final NativeCallbackTestFn tester = isLeaf
diff --git a/tests/ffi/function_structs_test.dart b/tests/ffi/function_structs_test.dart
index bfd6563..a4255c0 100644
--- a/tests/ffi/function_structs_test.dart
+++ b/tests/ffi/function_structs_test.dart
@@ -29,7 +29,7 @@
DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions");
/// pass a struct to a c function and get a struct as return value
-void testFunctionWithStruct({bool isLeaf: false}) {
+void testFunctionWithStruct({bool isLeaf = false}) {
Pointer<NativeFunction<NativeCoordinateOp>> p1 =
ffiTestFunctions.lookup("TransposeCoordinate");
NativeCoordinateOp f1 =
@@ -58,7 +58,7 @@
}
/// pass an array of structs to a c function
-void testFunctionWithStructArray({bool isLeaf: false}) {
+void testFunctionWithStructArray({bool isLeaf = false}) {
Pointer<NativeFunction<NativeCoordinateOp>> p1 =
ffiTestFunctions.lookup("CoordinateElemAt1");
NativeCoordinateOp f1 =
@@ -89,7 +89,7 @@
typedef VeryLargeStructSum = int Function(Pointer<VeryLargeStruct>);
typedef NativeVeryLargeStructSum = Int64 Function(Pointer<VeryLargeStruct>);
-void testFunctionWithVeryLargeStruct({bool isLeaf: false}) {
+void testFunctionWithVeryLargeStruct({bool isLeaf = false}) {
Pointer<NativeFunction<NativeVeryLargeStructSum>> p1 =
ffiTestFunctions.lookup("SumVeryLargeStruct");
VeryLargeStructSum f =