mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:27:39 +00:00
[vm/aot] Do not devirtualize calls with mismatching number of type arguments
Fixes https://github.com/dart-lang/sdk/issues/38254 Change-Id: I9597b1aecc5b1040d4c7e18d6ea272ab74af7ddc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118463 Reviewed-by: Ryan Macnak <rmacnak@google.com> Reviewed-by: Régis Crelier <regis@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
acac9ab11b
commit
9cc7ec8916
|
@ -65,6 +65,11 @@ abstract class Devirtualization extends RecursiveVisitor<Null> {
|
|||
}
|
||||
}
|
||||
|
||||
if (arguments.types.isNotEmpty &&
|
||||
arguments.types.length != func.typeParameters.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue