Skip to content

Commit 2a18723

Browse files
koogawaCodaFi
authored andcommitted
[gardening] Fix typos (#11245)
* [Gardening] Fix typo: getTopLeveDecls -> getTopLevelDecls * [Gardening] Fix typo: silModue -> silModule * [Gardening] Fix typo: Evaludate -> Evaluate * [Gardening] Fix typo: OptioanlPayload -> OptionalPayload * [Gardening] Fix typo: confromance -> conformance * [Gardening] Fix typos * [Gardening] Fix typo: tpye -> type * [Gardening] Fix typo: resoved -> resolved * [Gardening] Fix typo: ahve -> have * Revert "[Gardening] Fix typo: silModue -> silModule" This reverts commit ed8c4d0.
1 parent fa2f2bd commit 2a18723

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

lib/IDE/ModuleInterfacePrinting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ void swift::ide::printSubmoduleInterface(
494494
});
495495

496496
// If the group name is specified, we sort them according to their source order,
497-
// which is the order preserved by getTopLeveDecls.
497+
// which is the order preserved by getTopLevelDecls.
498498
if (GroupNames.empty()) {
499499
std::sort(SwiftDecls.begin(), SwiftDecls.end(),
500500
[&](Decl *LHS, Decl *RHS) -> bool {

lib/Parse/ParseIfConfig.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ ParserResult<IfConfigDecl> Parser::parseIfConfig(
583583
isActive = false;
584584
isVersionCondition = false;
585585
} else if (!foundActive) {
586-
// Evaludate the condition only if we haven't found any active one.
586+
// Evaluate the condition only if we haven't found any active one.
587587
isActive = evaluateIfConfigCondition(Condition, Context);
588588
isVersionCondition = isVersionIfConfigCondition(Condition);
589589
}

lib/SIL/SILOwnershipVerifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ class OwnershipCompatibilityBuiltinUseChecker
11361136

11371137
} // end anonymous namespace
11381138

1139-
// This is correct today since we do not ahve any builtins which return
1139+
// This is correct today since we do not have any builtins which return
11401140
// @guaranteed parameters. This means that we can only have a lifetime ending
11411141
// use with our builtins if it is owned.
11421142
#define CONSTANT_OWNERSHIP_BUILTIN(OWNERSHIP, LIFETIME_ENDING_USE, ID) \

lib/Sema/CSSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ ConstraintSystem::matchFunctionTypes(FunctionType *func1, FunctionType *func2,
11671167
SmallVector<LocatorPathElt, 4> path;
11681168
locator.getLocatorParts(path);
11691169

1170-
// Find the last path element, skipping OptioanlPayload elements
1170+
// Find the last path element, skipping OptionalPayload elements
11711171
// so that we allow this exception in cases of optional injection.
11721172
auto last = std::find_if(
11731173
path.rbegin(), path.rend(), [](LocatorPathElt &elt) -> bool {

lib/Sema/TypeCheckDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8505,15 +8505,15 @@ void TypeChecker::synthesizeMemberForLookup(NominalTypeDecl *target,
85058505
auto argumentName = argumentNames.front();
85068506
if (baseName.getIdentifier() == Context.Id_init &&
85078507
argumentName == Context.Id_from) {
8508-
// init(from:) may be synthesized as part of derived confromance to the
8508+
// init(from:) may be synthesized as part of derived conformance to the
85098509
// Decodable protocol.
85108510
// If the target should conform to the Decodable protocol, check the
85118511
// conformance here to attempt synthesis.
85128512
auto *decodableProto = Context.getProtocol(KnownProtocolKind::Decodable);
85138513
(void)evaluateTargetConformanceTo(decodableProto);
85148514
} else if (baseName.getIdentifier() == Context.Id_encode &&
85158515
argumentName == Context.Id_to) {
8516-
// encode(to:) may be synthesized as part of derived confromance to the
8516+
// encode(to:) may be synthesized as part of derived conformance to the
85178517
// Encodable protocol.
85188518
// If the target should conform to the Encodable protocol, check the
85198519
// conformance here to attempt synthesis.

lib/Sema/TypeCheckGeneric.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Type CompleteGenericTypeResolver::resolveDependentMemberType(
190190
return DependentMemberType::get(baseTy, assocType);
191191
}
192192

193-
// Otherwise, the nested type comes from a concrete tpye. Substitute the
193+
// Otherwise, the nested type comes from a concrete type. Substitute the
194194
// base type into it.
195195
auto concrete = ref->getBoundDecl();
196196
TC.validateDeclForNameLookup(concrete);

lib/Sema/TypeCheckType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3034,7 +3034,7 @@ Type TypeChecker::substMemberTypeWithBase(ModuleDecl *module,
30343034
if (auto *aliasDecl = dyn_cast<TypeAliasDecl>(member)) {
30353035
// FIXME: If this is a protocol typealias and we haven't built the
30363036
// protocol's generic environment yet, do so now, to ensure the
3037-
// typealias's underlying type has fully resoved dependent
3037+
// typealias's underlying type has fully resolved dependent
30383038
// member types.
30393039
if (auto *protoDecl = dyn_cast<ProtocolDecl>(aliasDecl->getDeclContext()))
30403040
if (protoDecl->getGenericEnvironment() == nullptr)

lib/Sema/TypeChecker.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ class TypeChecker final : public LazyResolver {
849849
/// Intended for debugging purposes only.
850850
unsigned WarnLongFunctionBodies = 0;
851851

852-
/// If non-zero, warn when type-chcking an expression takes longer
852+
/// If non-zero, warn when type-checking an expression takes longer
853853
/// than this many milliseconds.
854854
///
855855
/// Intended for debugging purposes only.
@@ -928,7 +928,7 @@ class TypeChecker final : public LazyResolver {
928928
ExpressionTimeoutThreshold = timeInSeconds;
929929
}
930930

931-
/// Return the current settting for the threshold that determines
931+
/// Return the current setting for the threshold that determines
932932
/// the upper bound for the number of seconds we'll let the
933933
/// expression type checker run before considering an expression
934934
/// "too complex".

0 commit comments

Comments
 (0)