Skip to content

[gardening] Fix typos #11245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 28, 2017
2 changes: 1 addition & 1 deletion lib/IDE/ModuleInterfacePrinting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ void swift::ide::printSubmoduleInterface(
});

// If the group name is specified, we sort them according to their source order,
// which is the order preserved by getTopLeveDecls.
// which is the order preserved by getTopLevelDecls.
if (GroupNames.empty()) {
std::sort(SwiftDecls.begin(), SwiftDecls.end(),
[&](Decl *LHS, Decl *RHS) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion lib/Parse/ParseIfConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ ParserResult<IfConfigDecl> Parser::parseIfConfig(
isActive = false;
isVersionCondition = false;
} else if (!foundActive) {
// Evaludate the condition only if we haven't found any active one.
// Evaluate the condition only if we haven't found any active one.
isActive = evaluateIfConfigCondition(Condition, Context);
isVersionCondition = isVersionIfConfigCondition(Condition);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/SIL/SILOwnershipVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ class OwnershipCompatibilityBuiltinUseChecker

} // end anonymous namespace

// This is correct today since we do not ahve any builtins which return
// This is correct today since we do not have any builtins which return
// @guaranteed parameters. This means that we can only have a lifetime ending
// use with our builtins if it is owned.
#define CONSTANT_OWNERSHIP_BUILTIN(OWNERSHIP, LIFETIME_ENDING_USE, ID) \
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/CSSimplify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ ConstraintSystem::matchFunctionTypes(FunctionType *func1, FunctionType *func2,
SmallVector<LocatorPathElt, 4> path;
locator.getLocatorParts(path);

// Find the last path element, skipping OptioanlPayload elements
// Find the last path element, skipping OptionalPayload elements
// so that we allow this exception in cases of optional injection.
auto last = std::find_if(
path.rbegin(), path.rend(), [](LocatorPathElt &elt) -> bool {
Expand Down
4 changes: 2 additions & 2 deletions lib/Sema/TypeCheckDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8407,15 +8407,15 @@ void TypeChecker::synthesizeMemberForLookup(NominalTypeDecl *target,
auto argumentName = argumentNames.front();
if (baseName.getIdentifier() == Context.Id_init &&
argumentName == Context.Id_from) {
// init(from:) may be synthesized as part of derived confromance to the
// init(from:) may be synthesized as part of derived conformance to the
// Decodable protocol.
// If the target should conform to the Decodable protocol, check the
// conformance here to attempt synthesis.
auto *decodableProto = Context.getProtocol(KnownProtocolKind::Decodable);
(void)evaluateTargetConformanceTo(decodableProto);
} else if (baseName.getIdentifier() == Context.Id_encode &&
argumentName == Context.Id_to) {
// encode(to:) may be synthesized as part of derived confromance to the
// encode(to:) may be synthesized as part of derived conformance to the
// Encodable protocol.
// If the target should conform to the Encodable protocol, check the
// conformance here to attempt synthesis.
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/TypeCheckGeneric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Type CompleteGenericTypeResolver::resolveDependentMemberType(
return DependentMemberType::get(baseTy, assocType);
}

// Otherwise, the nested type comes from a concrete tpye. Substitute the
// Otherwise, the nested type comes from a concrete type. Substitute the
// base type into it.
auto concrete = ref->getBoundDecl();
TC.validateDeclForNameLookup(concrete);
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/TypeCheckType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3024,7 +3024,7 @@ Type TypeChecker::substMemberTypeWithBase(ModuleDecl *module,
if (auto *aliasDecl = dyn_cast<TypeAliasDecl>(member)) {
// FIXME: If this is a protocol typealias and we haven't built the
// protocol's generic environment yet, do so now, to ensure the
// typealias's underlying type has fully resoved dependent
// typealias's underlying type has fully resolved dependent
// member types.
if (auto *protoDecl = dyn_cast<ProtocolDecl>(aliasDecl->getDeclContext()))
if (protoDecl->getGenericEnvironment() == nullptr)
Expand Down
4 changes: 2 additions & 2 deletions lib/Sema/TypeChecker.h
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ class TypeChecker final : public LazyResolver {
/// Intended for debugging purposes only.
unsigned WarnLongFunctionBodies = 0;

/// If non-zero, warn when type-chcking an expression takes longer
/// If non-zero, warn when type-checking an expression takes longer
/// than this many milliseconds.
///
/// Intended for debugging purposes only.
Expand Down Expand Up @@ -914,7 +914,7 @@ class TypeChecker final : public LazyResolver {
ExpressionTimeoutThreshold = timeInSeconds;
}

/// Return the current settting for the threshold that determines
/// Return the current setting for the threshold that determines
/// the upper bound for the number of seconds we'll let the
/// expression type checker run before considering an expression
/// "too complex".
Expand Down