[dart2js] Two small fixes for building dart2js with the nnbd runtime.

Fix for NoSuchmethod's signature.
Fix for NeverType's scope visitor.

Change-Id: I7d98e37eb7bfcb67339b36d1b335fc4ba9eff6d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136320
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
This commit is contained in:
Joshua Litt 2020-02-18 23:02:49 +00:00 committed by commit-bot@chromium.org
parent b706395788
commit 6c68844821
2 changed files with 6 additions and 2 deletions

View file

@ -617,6 +617,10 @@ class ScopeModelBuilder extends ir.Visitor<InitializerComplexity>
InitializerComplexity visitBottomType(ir.BottomType node) =>
const InitializerComplexity.lazy();
@override
InitializerComplexity visitNeverType(ir.NeverType node) =>
const InitializerComplexity.lazy();
@override
InitializerComplexity visitInvalidType(ir.InvalidType node) =>
const InitializerComplexity.lazy();

View file

@ -3161,8 +3161,8 @@ void assertHelper(condition) {
/// resolved cannot be found.
void throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {
Symbol memberName = new _symbol_dev.Symbol.unvalidated(name);
throw new NoSuchMethodError(obj, memberName, arguments,
new Map<Symbol, dynamic>(), expectedArgumentNames);
throw new NoSuchMethodError(
obj, memberName, arguments, new Map<Symbol, dynamic>());
}
/// Called by generated code when a static field's initializer references the