Commit 723c856
[analyzer] Rework
Previously, the `InterfaceTypeImpl._` constructor threw an exception
if an interface type was being constructed for the type `Null`
(because the `NullTypeImpl` constructor should be used instead). This
was silly; as long as we're going to check, we might as well put the
check in the `InterfaceTypeImpl` factory constructor, and have it
simply construct the appropriate subtype. This is simpler, and should
be much lower risk, since we no longer have a code path that has to
throw an exception.
Change-Id: Ie3ed216b285e371866a6a35ccccdf997b8a1f95e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396620
Reviewed-by: Brian Wilkerson <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Paul Berry <[email protected]>InterfaceTypeImpl constructor to call NullTypeImpl
1 parent f6e4b3e commit 723c856
File tree
3 files changed
+12
-27
lines changed- pkg/analyzer/lib/src/dart/element
3 files changed
+12
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5913 | 5913 | | |
5914 | 5914 | | |
5915 | 5915 | | |
5916 | | - | |
5917 | | - | |
5918 | | - | |
5919 | | - | |
5920 | | - | |
5921 | | - | |
5922 | | - | |
5923 | | - | |
5924 | | - | |
5925 | | - | |
| 5916 | + | |
| 5917 | + | |
| 5918 | + | |
| 5919 | + | |
| 5920 | + | |
5926 | 5921 | | |
5927 | 5922 | | |
5928 | 5923 | | |
| |||
10283 | 10278 | | |
10284 | 10279 | | |
10285 | 10280 | | |
10286 | | - | |
10287 | | - | |
10288 | | - | |
10289 | | - | |
10290 | | - | |
10291 | 10281 | | |
10292 | 10282 | | |
10293 | 10283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| 537 | + | |
| 538 | + | |
537 | 539 | | |
538 | 540 | | |
539 | 541 | | |
| |||
549 | 551 | | |
550 | 552 | | |
551 | 553 | | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | 554 | | |
556 | 555 | | |
557 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
620 | 616 | | |
621 | 617 | | |
0 commit comments