Skip to content

Commit

Permalink
Eliminate dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
kyouko-taiga committed Aug 17, 2024
1 parent 071ec5c commit 2367d77
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions Sources/FrontEnd/TypeChecking/TypeChecker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6184,26 +6184,6 @@ struct TypeChecker {
assert(solution.isSound || diagnostics.containsError, "inference failed without diagnostics")
}

/// Commits `r` in the program, where `r` is the name resolution result for a name component
/// used in a type expression, returning the type of that component.
///
/// - Precondition: `r` has a single candidate.
private mutating func bindTypeAnnotation(
_ r: NameResolutionResult.ResolvedComponent
) -> AnyType {
let c = r.candidates.uniqueElement!
cache.write(c.reference, at: \.referredDecl[r.component], ignoringSharedCache: true)

let t: AnyType
if isBoundToNominalTypeDecl(c.reference) {
t = MetatypeType(c.type)!.instance
} else {
t = c.type
}
cache.write(t, at: \.exprType[r.component], ignoringSharedCache: true)
return t
}

/// Calls `action` on `self`, logging a trace of constraint solving iff `shouldTraceInference(n)`
/// returns `true`.
private mutating func tracingInference<T: NodeIDProtocol>(
Expand Down

0 comments on commit 2367d77

Please sign in to comment.