672877606d
We used thisType in invalid_runtime_check_with_js_interop_types to ignore nullability and generics when comparing two types for checks and casts. This is erroneous when doing a subtype check because the distinct instantiated type arguments in each type will lead to the two types not being subtypes of each other. When JSExportedDartFunction and JSFunction became generic, this became an issue because now JSFunction<T> is not a supertype of JSExportedDartFunction<T>. So, instead, we should always initialize the params to their bounds when comparing types if we want to ignore generics. Change-Id: I8418d3b87123a658fbe8a0a9379f43cba738f063 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498241 Reviewed-by: Samuel Rawlins <srawlins@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>