Skip to content

Commit

Permalink
[vm/kernel/bytecode] Fix capturing of factory type arguments in bytecode
Browse files Browse the repository at this point in the history
Change-Id: I3d1b1d78684b7a5f3c117ec24d7e406a7b4feabd
Reviewed-on: https://dart-review.googlesource.com/70560
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
  • Loading branch information
alexmarkov authored and commit-bot@chromium.org committed Aug 17, 2018
1 parent 0c2d382 commit 4da7360
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/vm/lib/bytecode/local_vars.dart
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,8 @@ class _Allocator extends RecursiveVisitor<Null> {
function.namedParameters.isNotEmpty;

_currentFrame.hasCapturedParameters =
(hasReceiver && locals.isCaptured(_currentFrame.receiverVar)) ||
(isFactory && locals.isCaptured(_currentFrame.factoryTypeArgsVar)) ||
(hasReceiver && locals.isCaptured(_currentFrame.receiverVar)) ||
function.positionalParameters.any(locals.isCaptured) ||
function.namedParameters.any(locals.isCaptured);

Expand Down

0 comments on commit 4da7360

Please sign in to comment.