mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:59:47 +00:00
[vm/nnbd/bytecode] Distinguish function types with different nullabilities in bytecode generator
Fixes https://github.com/dart-lang/sdk/issues/42807 Change-Id: I054b79c5b199fbc53e512caf8e41ddbcb79d3675 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155682 Reviewed-by: Régis Crelier <regis@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
d2f7039e9c
commit
56708696a9
|
@ -1149,6 +1149,7 @@ class _FunctionTypeHandle extends _TypeHandle {
|
|||
hash = _combineHashes(hash, listHashCode(positionalParams));
|
||||
hash = _combineHashes(hash, listHashCode(namedParams));
|
||||
hash = _combineHashes(hash, returnType.hashCode);
|
||||
hash = _combineHashes(hash, nullability.index);
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
@ -1159,7 +1160,8 @@ class _FunctionTypeHandle extends _TypeHandle {
|
|||
this.numRequiredParams == other.numRequiredParams &&
|
||||
listEquals(this.positionalParams, other.positionalParams) &&
|
||||
listEquals(this.namedParams, other.namedParams) &&
|
||||
this.returnType == other.returnType;
|
||||
this.returnType == other.returnType &&
|
||||
this.nullability == other.nullability;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
|
Loading…
Reference in a new issue