Skip to content

Commit cf0a50b

Browse files
committed
Remove restriction that @functionBuilders have to be uppercased;
we're not doing this anymore.
1 parent e08f1fb commit cf0a50b

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4478,8 +4478,6 @@ ERROR(function_builder_control_flow, none,
44784478
NOTE(note_function_builder_control_flow, none,
44794479
"closure containing control flow statement cannot be used with function "
44804480
"builder %0", (DeclName))
4481-
ERROR(function_builder_reserved_name, none,
4482-
"function builder type name must start with an uppercase letter", ())
44834481
ERROR(function_builder_attribute_not_allowed_here, none,
44844482
"function builder attribute %0 can only be applied to a parameter, "
44854483
"function, or computed property", (DeclName))

lib/Sema/TypeCheckAttr.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,15 +2635,6 @@ void AttributeChecker::visitPropertyWrapperAttr(PropertyWrapperAttr *attr) {
26352635
}
26362636

26372637
void AttributeChecker::visitFunctionBuilderAttr(FunctionBuilderAttr *attr) {
2638-
auto nominal = dyn_cast<NominalTypeDecl>(D);
2639-
if (!nominal)
2640-
return;
2641-
2642-
// Make sure the name isn't reserved.
2643-
if (isReservedAttributeName(nominal->getName().str())) {
2644-
nominal->diagnose(diag::function_builder_reserved_name);
2645-
}
2646-
26472638
// TODO: check that the type at least provides a `sequence` factory?
26482639
// Any other validation?
26492640
}

0 commit comments

Comments
 (0)