Skip to content

Commit 7313b2f

Browse files
committed
[NFC] Move a diagnostic from DiagnosticsParse.def to DiagnosticsSema.def
1 parent 9017bf7 commit 7313b2f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

include/swift/AST/DiagnosticsParse.def

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,11 +1346,6 @@ ERROR(expected_identifier_after_super_dot_expr,
13461346
"expected identifier or 'init' after super '.' expression", ())
13471347
ERROR(expected_dot_or_subscript_after_super,PointsToFirstBadToken,
13481348
"expected '.' or '[' after 'super'", ())
1349-
ERROR(super_in_closure_with_capture,none,
1350-
"using 'super' in a closure where 'self' is explicitly captured is "
1351-
"not yet supported", ())
1352-
NOTE(super_in_closure_with_capture_here,none,
1353-
"'self' explicitly captured here", ())
13541349

13551350
WARNING(await_before_try,none, "'try' must precede 'await'", ())
13561351

include/swift/AST/DiagnosticsSema.def

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4315,6 +4315,8 @@ ERROR(no_MaxBuiltinFloatType_found,none,
43154315
ERROR(no_member_of_module,none,
43164316
"module %0 has no member named %1", (Identifier, DeclNameRef))
43174317

4318+
// 'super'.
4319+
43184320
ERROR(super_no_superclass,none,
43194321
"'super' cannot be used in %select{|extension of }0class %1 because it "
43204322
"has no superclass",
@@ -4326,6 +4328,12 @@ ERROR(super_in_nonclass_type,none,
43264328
"'super' cannot be used in non-class type %0",
43274329
(const NominalTypeDecl *))
43284330

4331+
ERROR(super_in_closure_with_capture,none,
4332+
"using 'super' in a closure where 'self' is explicitly captured is "
4333+
"not yet supported", ())
4334+
NOTE(super_in_closure_with_capture_here,none,
4335+
"'self' explicitly captured here", ())
4336+
43294337
ERROR(unqualified_init,none,
43304338
"initializer expression requires explicit access"
43314339
"%select{|; did you mean to prepend it with|; did you mean to prepend "

0 commit comments

Comments
 (0)