From 334035c8fa5fd8b11f8d09cc1ee4828c45f24326 Mon Sep 17 00:00:00 2001 From: Dimi Racordon Date: Mon, 23 Dec 2024 11:19:05 +0100 Subject: [PATCH 1/2] Fix typos in docs --- Sources/IR/Analysis/DominatorTree.swift | 4 ++-- Sources/Utils/DoublyLinkedList.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/IR/Analysis/DominatorTree.swift b/Sources/IR/Analysis/DominatorTree.swift index 2bc1bcf1c..e52937699 100644 --- a/Sources/IR/Analysis/DominatorTree.swift +++ b/Sources/IR/Analysis/DominatorTree.swift @@ -6,8 +6,8 @@ import Utils /// - A block `b1` in a control-flow graph *dominates* a block `b2` if every path from the entry to /// `b2` must go through `b1`. By definition, every node dominates itself. /// - A block `b1` *strictly dominates* a block `b2` if `b1` dominates `b2` and `b1 != b2`. -/// - A block `b1` is the *immediately dominates* a block `b2` if `b1` strictly dominates `b2` and -/// there is no block `b3` that strictly dominates `b2`. +/// - A block `b1` *immediately dominates* a block `b2` if `b1` strictly dominates `b2` and there +/// is no block `b3` that strictly dominates `b2`. /// /// A dominator tree encodes the dominance relation of a control graph as a tree where a node is /// a basic blocks and its children are those it immediately dominates. diff --git a/Sources/Utils/DoublyLinkedList.swift b/Sources/Utils/DoublyLinkedList.swift index 1fed1327b..5f855c02b 100644 --- a/Sources/Utils/DoublyLinkedList.swift +++ b/Sources/Utils/DoublyLinkedList.swift @@ -2,7 +2,7 @@ public struct DoublyLinkedList { // The raw storage grows automatically when inserting an element would exceed its capability, but - // it never shinks. A linked list keeps track of the free buckets in the buffer to reuse memory + // it never shrinks. A linked list keeps track of the free buckets in the buffer to reuse memory // after an element has been removed. /// The address of an element in a doubly linked list. From 83c5cdeda2054306be4853daf8f0ece916263ec3 Mon Sep 17 00:00:00 2001 From: Dimi Racordon Date: Mon, 23 Dec 2024 11:19:33 +0100 Subject: [PATCH 2/2] Fix 'Token.isDeclModifier' --- Sources/FrontEnd/Parse/Token.swift | 2 +- Sources/FrontEnd/TypeChecking/TypeChecker.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/FrontEnd/Parse/Token.swift b/Sources/FrontEnd/Parse/Token.swift index fc6e76db7..a084fb53e 100644 --- a/Sources/FrontEnd/Parse/Token.swift +++ b/Sources/FrontEnd/Parse/Token.swift @@ -144,7 +144,7 @@ public struct Token { /// Indicates whether `self` is a declaration modifier. public var isDeclModifier: Bool { switch kind { - case .public, .static: + case .public, .static, .private, .internal: return true default: return false diff --git a/Sources/FrontEnd/TypeChecking/TypeChecker.swift b/Sources/FrontEnd/TypeChecking/TypeChecker.swift index 84d2af621..1f7bd7fbe 100644 --- a/Sources/FrontEnd/TypeChecking/TypeChecker.swift +++ b/Sources/FrontEnd/TypeChecking/TypeChecker.swift @@ -4201,7 +4201,7 @@ struct TypeChecker { if !tentative.isEmpty { return tentative - } else if isQualified && ds.contains(where: { $0.kind == GenericParameterDecl.self }) { + } else if ds.contains(where: { $0.kind == GenericParameterDecl.self }) { let membersOfConformedTraits = conformedTraits(of: context!.type, in: scopeOfUse) .map({ lookup(name, memberOf: AnyType($0), exposedTo: scopeOfUse) }) return filterAccessible(Array(Set(membersOfConformedTraits.joined())))