b18efe2891
Previously type tests involving type parameter types would be replaced with native primitive tests when the type parameter was bounded by a type with a native representation. This isn't always correct because the type parameter can always be inhabited by the bottom type at runtime. So code like `x is T` would be true when `T` is instantiated as `Never` and `x` is any primitive value like a number, string, or bool. This change removes the incorrect optimization that allowed type parameters to be replaced with their bound when that bound was represented by a native type when performing an `is` operation. Fixes: https://github.com/dart-lang/sdk/issues/52243 Change-Id: I57cebef7bb533d71831ef84415b3d91369758476 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300820 Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Anna Gringauze <annagrin@google.com>