Commit Graph

10 Commits

Author SHA1 Message Date
Nate Chandler
d06e6a3c51 [Sema] Improved dynamic replacement diagnostic.
Make use of swift::getAccessorNameForDiagnostic instead of having a
parallel list of accessor names in DiagnosticsSema.def.
2024-09-26 08:27:21 -07:00
fummicc1
4dda7efc0f [AST] Improve diagnostics message for swift users.
Use `initializer` instead of `constructor` because it is more official word to express its meaning.
2024-03-27 12:32:25 +09:00
Varun Gandhi
a1716fe2a6 [Diagnostics] Update compiler diagnostics to use less jargon. (#31315)
Fixes rdar://problem/62375243.
2020-04-28 14:11:39 -07:00
Robert Widmann
12b157e2bc Restore two tests
Address review feedback on #26970
2019-09-06 09:57:18 -07:00
Robert Widmann
59687518e2 Reject nominal extensions (with a bit of indirection)
If the canonical type is a nominal type then we can offer a diagnostic
that rewrites to it.

Resolves rdar://54799560
2019-09-01 01:52:41 -05:00
Arnold Schwaighofer
85d732ca26 TypeChecker: Fix dynamic replacement of protocol default implementation
Ignore the decl inside the protocol decl.

rdar://52863618
2019-07-11 10:00:31 -07:00
Arnold Schwaighofer
1b863d6787 Allow final on dynamic members
Dynamic is about dynamically replacing a method implementiation not
overriding.

rdar://49535048
2019-04-04 07:26:43 -07:00
Arnold Schwaighofer
36e210a34e Sema: Fix a crash when checking dynamic replacements on a non existing type
rdar://48584489
2019-03-14 12:02:32 -07:00
Arnold Schwaighofer
8d9b9f328b SILGen: Fix the logic of dynamic replacements for class constructors
To correctly call designated super class initializers the designated
intializer (and not the allocator) is dynamically replaceable.
Convenience allocators are dynamically replaceable as before.
2019-02-22 10:15:06 -08:00
Doug Gregor
5d968621d7 [Type checker] Basic ambiguity resolution + diagnostics for dynamic replacement.
We weren't doing much validation when dynamically replacing storage
declarations, and has an assert() that should be an error. Clean up this
area a bit, dealing with simple ambiguities (i.e., there are two
properties or subscripts with different type signatures; pick the
matching one) and reporting an error when there is a true ambiguity.

Fixes rdar://problem/46737657.
2018-12-21 11:47:59 -08:00