Skip to content

Commit

Permalink
[dart2js] new-rti: debug print of named type variable miss
Browse files Browse the repository at this point in the history
Change-Id: Ib344442c1dc15136408df761852e901abf4b80c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127221
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
  • Loading branch information
rakudrama authored and commit-bot@chromium.org committed Dec 9, 2019
1 parent 7974f3f commit 964c9d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdk/lib/_internal/js_runtime/lib/rti.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,9 @@ class _Universe {
Object rule = _Universe.findRule(universe, interfaceName);
assert(rule != null);
String recipe = TypeRule.lookupTypeVariable(rule, name);
if (recipe == null) {
throw 'No "$name" in "${Rti._getCanonicalRecipe(environment)}"';
}
return _Universe.evalInEnvironment(universe, environment, recipe);
}

Expand Down
3 changes: 3 additions & 0 deletions sdk_nnbd/lib/_internal/js_runtime/lib/rti.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,9 @@ class _Universe {
Object rule = _Universe.findRule(universe, interfaceName);
assert(rule != null);
String recipe = TypeRule.lookupTypeVariable(rule, name);
if (recipe == null) {
throw 'No "$name" in "${Rti._getCanonicalRecipe(environment)}"';
}
return _Universe.evalInEnvironment(universe, environment, recipe);
}

Expand Down

0 comments on commit 964c9d8

Please sign in to comment.