Skip to content

Commit

Permalink
Merge pull request #29323 from LucianoPAlmeida/nfc-minor-comments
Browse files Browse the repository at this point in the history
[NFC] Fixing minor comments and code
  • Loading branch information
xedin committed Jan 21, 2020
2 parents 68c7a99 + fb12c09 commit 203a2b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions lib/Sema/CSDiagnostics.cpp
Expand Up @@ -4620,9 +4620,7 @@ bool InaccessibleMemberFailure::diagnoseAsError() {
auto &cs = getConstraintSystem();
auto *locator =
cs.getConstraintLocator(baseExpr, ConstraintLocator::Member);
if (llvm::any_of(cs.getFixes(), [&](const ConstraintFix *fix) {
return fix->getLocator() == locator;
}))
if (cs.hasFixFor(locator))
return false;
}

Expand Down
14 changes: 7 additions & 7 deletions lib/Sema/CSDiagnostics.h
Expand Up @@ -558,8 +558,8 @@ class ContextualFailure : public FailureDiagnostic {
/// Diagnose failed conversion in a `CoerceExpr`.
bool diagnoseCoercionToUnrelatedType() const;

// If we're trying to convert something of type "() -> T" to T,
// then we probably meant to call the value.
/// If we're trying to convert something of type "() -> T" to T,
/// then we probably meant to call the value.
bool diagnoseMissingFunctionCall() const;

/// Produce a specialized diagnostic if this is an invalid conversion to Bool.
Expand Down Expand Up @@ -1376,11 +1376,11 @@ class MutatingMemberRefOnImmutableBase final : public FailureDiagnostic {
bool diagnoseAsError() override;
};

// Diagnose an attempt to use AnyObject as the root type of a KeyPath
//
// ```swift
// let keyPath = \AnyObject.bar
// ```
/// Diagnose an attempt to use AnyObject as the root type of a KeyPath
///
/// ```swift
/// let keyPath = \AnyObject.bar
/// ```
class AnyObjectKeyPathRootFailure final : public FailureDiagnostic {

public:
Expand Down

0 comments on commit 203a2b6

Please sign in to comment.