Commit 086dc14
committed
Don't link-check the Optional/AnyHashable workaround
This restores the earlier behavior of Optionals cast to
AnyHashable, so that [String?:Any] dictionaries cast
to [AnyHashable:Any] can be indexed by plain String
keys.
This is a little problematic because it's not consistent with the
compiler-optimized casts.
But the ability to index such dictionaries by plain String
keys seems important to preserve. SR-9047 will expand
Optional/AnyHashable interoperability so that such
indexing works without this special case.
An earlier proposal would link-check this, changing the behavior
depending on the caller. But it's not really workable to
change the behavior seen by intermediate frameworks depending
on the app they're being called by.1 parent 067beb1 commit 086dc14
File tree
2 files changed
+32
-37
lines changed- stdlib/public/runtime
- test/Casting
2 files changed
+32
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | 715 | | |
724 | 716 | | |
725 | 717 | | |
| |||
747 | 739 | | |
748 | 740 | | |
749 | 741 | | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
765 | 758 | | |
| 759 | + | |
766 | 760 | | |
767 | 761 | | |
768 | 762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
890 | | - | |
| 890 | + | |
891 | 891 | | |
| 892 | + | |
| 893 | + | |
892 | 894 | | |
893 | | - | |
| 895 | + | |
894 | 896 | | |
895 | | - | |
896 | | - | |
897 | | - | |
| 897 | + | |
898 | 898 | | |
899 | | - | |
| 899 | + | |
900 | 900 | | |
901 | | - | |
| 901 | + | |
902 | 902 | | |
903 | | - | |
| 903 | + | |
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
907 | | - | |
| 907 | + | |
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
912 | | - | |
913 | | - | |
914 | | - | |
| 912 | + | |
915 | 913 | | |
916 | | - | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
917 | 918 | | |
918 | 919 | | |
919 | 920 | | |
920 | 921 | | |
921 | 922 | | |
922 | | - | |
| 923 | + | |
923 | 924 | | |
924 | 925 | | |
925 | 926 | | |
| |||
0 commit comments