Skip to content

Commit 28de53f

Browse files
committed
[NFC] Move a diagnostic from DiagnosticsCommon.def to DiagnosticsSema.def
1 parent eb40cc5 commit 28de53f

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

include/swift/AST/DiagnosticsCommon.def

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ NOTE(while_parsing_as_left_angle_bracket,none,
5656
REMARK(remark_max_determinism_overriding,none,
5757
"SWIFTC_MAXIMUM_DETERMINISM overriding %0", (StringRef))
5858

59-
// FIXME: This is used both as a parse error (a literal "super" outside a
60-
// method) and a type-checker error ("super" in a method of a non-class type).
61-
ERROR(super_not_in_class_method,none,
62-
"'super' cannot be used outside of class members", ())
63-
6459
ERROR(class_func_not_in_class,none,
6560
"class methods are only allowed within classes; "
6661
"use 'static' to declare a %select{static|requirement fulfilled by either a static or class}0 method", (bool))

include/swift/AST/DiagnosticsSema.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4317,6 +4317,9 @@ ERROR(no_member_of_module,none,
43174317

43184318
ERROR(super_with_no_base_class,none,
43194319
"'super' members cannot be referenced in a root class", ())
4320+
ERROR(super_not_in_class_method,none,
4321+
"'super' cannot be used outside of class members", ())
4322+
43204323
ERROR(unqualified_init,none,
43214324
"initializer expression requires explicit access"
43224325
"%select{|; did you mean to prepend it with|; did you mean to prepend "

0 commit comments

Comments
 (0)