You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Typechecker] Emit a specialised diagnostic for redeclaration errors when the declaration is synthesised (#31915)
* [Typechecker] Emit a specialized diagnostic for redeclaration errors when the declaration is synthesized
* [Test] Update existing tests
* [Typechecker] Diagnose the original wrapped property instead of the nearest non-implicit decl context
* [Test] Update existing tests
* [Typechecker] Do not diagnose redeclarations when both declarations are implicit
* [Test] Update a AutoDiff test
// expected-warning @+1 {{stored property 'int' has no derivative because 'Generic<Int>' does not conform to 'Differentiable'; add an explicit '@noDerivative' attribute}}
// expected-note@-2 {{'_int' synthesized for property wrapper backing storage}}
22
+
// expected-warning@-3 {{stored property 'int' has no derivative because 'Generic<Int>' does not conform to 'Differentiable'; add an explicit '@noDerivative' attribute}}
22
23
23
-
// expected-error @+1 {{invalid redeclaration of 'int'}}
24
24
@Wrappervarint:Generic<Int>
25
+
// expected-error@-1 {{invalid redeclaration of 'int'}}
26
+
// expected-error@-2 {{invalid redeclaration of synthesized property '_int'}}
0 commit comments