Skip to content

Commit 942c58f

Browse files
nshahancommit-bot@chromium.org
authored andcommitted
[dartdevc] Fix build errors in runtime patch files
Change-Id: I98bb1435e9fe888158a4ccad7dc4a39ee73fb936 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127491 Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Mark Zhou <markzipan@google.com>
1 parent 98da22a commit 942c58f

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

sdk_nnbd/lib/_internal/js_dev_runtime/patch/isolate_patch.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ class _ReceivePort extends Stream implements ReceivePort {
9999

100100
get sendPort => _unsupported();
101101

102-
listen(onData, {onError, onDone, cancelOnError}) => _unsupported();
102+
StreamSubscription listen(void Function(dynamic) onData,
103+
{Function onError, void Function() onDone, bool cancelOnError}) =>
104+
_unsupported();
103105
}
104106

105107
@patch

sdk_nnbd/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class InvocationImpl extends Invocation {
1919

2020
InvocationImpl(memberName, List<Object?> positionalArguments,
2121
{namedArguments,
22-
List typeArguments = [],
22+
List typeArguments = const [],
2323
this.isMethod = false,
2424
this.isGetter = false,
2525
this.isSetter = false,
@@ -185,8 +185,8 @@ String? _argumentErrors(FunctionType type, List actuals, namedActuals) {
185185
if (namedActuals != null) {
186186
names = getOwnPropertyNames(namedActuals);
187187
for (var name in names!) {
188-
if (!JS<bool>('!', '(#.hasOwnProperty(#) || #.hasOwnProperty(#))', named, name,
189-
requiredNamed, name)) {
188+
if (!JS<bool>('!', '(#.hasOwnProperty(#) || #.hasOwnProperty(#))', named,
189+
name, requiredNamed, name)) {
190190
return "Dynamic call with unexpected named argument '$name'.";
191191
}
192192
}

sdk_nnbd/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ class GenericFunctionType extends AbstractFunctionType {
649649
GenericFunctionType(instantiateTypeParts, this._instantiateTypeBounds)
650650
: _instantiateTypeParts = instantiateTypeParts,
651651
formalCount = JS('!', '#.length', instantiateTypeParts),
652-
_typeFormals = _typeFormalsFromFunction(_instantiateTypeParts);
652+
_typeFormals = _typeFormalsFromFunction(instantiateTypeParts);
653653

654654
List<TypeVariable> get typeFormals => _typeFormals;
655655

sdk_nnbd/lib/_internal/js_dev_runtime/private/js_string.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ class JSString extends Interceptor implements String, JSIndexable<String> {
495495
Type get runtimeType => String;
496496

497497
@notNull
498-
late int length;
498+
final int length;
499499

500500
@notNull
501501
String operator [](@nullCheck int index) {

0 commit comments

Comments
 (0)