Commit 6e5562a
committed
Sema: Improve diagnostics for overrides of unavailable decls.
Unavailable decls cannot be overridden by available decls. This change improves
the compiler diagnostics for this restriction in a few ways:
- Duplicate diagnostics are suppressed for getters and setters inside property
declarations that have already been diagnosed.
- Diagnostics are suppressed for implicit accessors since they would typically
duplicate diagnostics for the explicit accessors the implicit ones are
derived from.
- Decls inside unavailable a derived class are no longer incorrectly diagnosed.1 parent 1808850 commit 6e5562a
File tree
7 files changed
+330
-81
lines changed- lib/Sema
- test
- Sema
- attr
7 files changed
+330
-81
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2755 | 2755 | | |
2756 | 2756 | | |
2757 | 2757 | | |
2758 | | - | |
2759 | | - | |
2760 | | - | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
2761 | 2761 | | |
2762 | 2762 | | |
2763 | 2763 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
250 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1835 | 1835 | | |
1836 | 1836 | | |
1837 | 1837 | | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
1838 | 1884 | | |
1839 | 1885 | | |
1840 | 1886 | | |
| |||
2066 | 2112 | | |
2067 | 2113 | | |
2068 | 2114 | | |
2069 | | - | |
2070 | | - | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
2071 | 2122 | | |
2072 | 2123 | | |
2073 | 2124 | | |
2074 | 2125 | | |
2075 | | - | |
2076 | | - | |
2077 | | - | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
2078 | 2130 | | |
2079 | 2131 | | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
2080 | 2137 | | |
2081 | 2138 | | |
2082 | 2139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4384 | 4384 | | |
4385 | 4385 | | |
4386 | 4386 | | |
4387 | | - | |
| 4387 | + | |
4388 | 4388 | | |
4389 | 4389 | | |
4390 | 4390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | 34 | | |
93 | 35 | | |
94 | 36 | | |
| |||
0 commit comments