Skip to content

Commit

Permalink
[dartdevc] Fix build errors in runtime patch files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nshahan authored and commit-bot@chromium.org committed Dec 7, 2019
1 parent 98da22a commit 942c58f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ class _ReceivePort extends Stream implements ReceivePort {

get sendPort => _unsupported();

listen(onData, {onError, onDone, cancelOnError}) => _unsupported();
StreamSubscription listen(void Function(dynamic) onData,
{Function onError, void Function() onDone, bool cancelOnError}) =>
_unsupported();
}

@patch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class InvocationImpl extends Invocation {

InvocationImpl(memberName, List<Object?> positionalArguments,
{namedArguments,
List typeArguments = [],
List typeArguments = const [],
this.isMethod = false,
this.isGetter = false,
this.isSetter = false,
Expand Down Expand Up @@ -185,8 +185,8 @@ String? _argumentErrors(FunctionType type, List actuals, namedActuals) {
if (namedActuals != null) {
names = getOwnPropertyNames(namedActuals);
for (var name in names!) {
if (!JS<bool>('!', '(#.hasOwnProperty(#) || #.hasOwnProperty(#))', named, name,
requiredNamed, name)) {
if (!JS<bool>('!', '(#.hasOwnProperty(#) || #.hasOwnProperty(#))', named,
name, requiredNamed, name)) {
return "Dynamic call with unexpected named argument '$name'.";
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ class GenericFunctionType extends AbstractFunctionType {
GenericFunctionType(instantiateTypeParts, this._instantiateTypeBounds)
: _instantiateTypeParts = instantiateTypeParts,
formalCount = JS('!', '#.length', instantiateTypeParts),
_typeFormals = _typeFormalsFromFunction(_instantiateTypeParts);
_typeFormals = _typeFormalsFromFunction(instantiateTypeParts);

List<TypeVariable> get typeFormals => _typeFormals;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ class JSString extends Interceptor implements String, JSIndexable<String> {
Type get runtimeType => String;

@notNull
late int length;
final int length;

@notNull
String operator [](@nullCheck int index) {
Expand Down

0 comments on commit 942c58f

Please sign in to comment.