3b4d753b8e
ConstantEvaluator.isSubtype contains special logic to handle JS number subtyping. It then delegates any recursive subtype checking to TypeEnvironment.isSubtypeOf. TypeEnvironment.isSubtypeOf is not aware of the JS context and has no special logic for JS numbers. This leads to inconsistent behavior when numbers are nested in records. The special number logic is never applied to those nested types. Fixes: https://github.com/dart-lang/sdk/issues/52619 Change-Id: I72c64bb0544aea79bd83bc589abdda96c851525c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307720 Commit-Queue: Nate Biggs <natebiggs@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>