Migration: do not union inferred types in overrides.
Previously, when handling an override such as:
abstract class A {
int/*?*/ f();
}
class C implements A {
f() => 0;
}
we would create a union edge between the implicit return type of C.f
and the explicit return type of A.f. This was a problem because
nullability information can propagate bidirectionally through union
edges, so it could result in types unnecessarily becoming nullable,
e.g.:
abstract class A {
int/*?*/ f();
}
abstract class B {
int f(); // Should not need to be made nullable
}
class C implements A, B {
f() => 0;
}
This CL fixes the problem by just making ordinary unidirectional edges
for overrides involving inferred types.
Change-Id: I63a5f1f640b5543fcf39304087592e984aa66694
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141853
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
https://dart.googlesource.com/sdk/+/f04053d767466f057ab5c414cee3e257ea7a8959
diff --git a/commits.json b/commits.json
index 018538f..b950e84 100644
--- a/commits.json
+++ b/commits.json
@@ -1,5 +1,5 @@
{
"external/github.com/flutter/engine":"767b48abc91e474ed170b573ee1262ee1088bb0e",
"external/github.com/flutter/flutter":"0bc361f09b130b410ccd63af77665e5e0559c150",
- "sdk":"d6a096cb03f45119876ab0dbde7c445bf635bcb1"
+ "sdk":"f04053d767466f057ab5c414cee3e257ea7a8959"
}
\ No newline at end of file