| Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
|
| diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
|
| index dac18f95c18ebd24cebef6be65468743df024a75..1edf437d85cbb3822f238f6a7fe44225d40eef2c 100644
|
| --- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
|
| +++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
|
| @@ -804,11 +804,17 @@ class DynamicCallSiteTypeInformation extends CallSiteTypeInformation {
|
| // Dart code, for example:
|
| // int + int -> int
|
| // uint31 | uint31 -> uint31
|
| - if (name == '*' || name == '+' || name == '%' || name == 'remainder' ||
|
| + if (name == '*' || name == '+' ||name == '%' || name == 'remainder' ||
|
| name == '~/') {
|
| if (isPositiveInt(receiver) &&
|
| arguments.hasOnePositionalArgumentThatMatches(isPositiveInt)) {
|
| - return inferrer.types.positiveIntType;
|
| + // uint31 + uint31 -> uint32
|
| + if (name == '+' && isUInt31(receiver) &&
|
| + arguments.hasOnePositionalArgumentThatMatches(isUInt31)) {
|
| + return inferrer.types.uint32Type;
|
| + } else {
|
| + return inferrer.types.positiveIntType;
|
| + }
|
| } else if (arguments.hasOnePositionalArgumentThatMatches(isInt)) {
|
| return inferrer.types.intType;
|
| } else if (arguments.hasOnePositionalArgumentThatMatches(isEmpty)) {
|
|
|