Skip to content

Commit f88d5ac

Browse files
authored
Merge pull request #1638 from hylo-lang/decl-modifier
Fix 'Token.isDeclModifier'
2 parents 734e7be + 83c5cde commit f88d5ac

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Sources/FrontEnd/Parse/Token.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public struct Token {
144144
/// Indicates whether `self` is a declaration modifier.
145145
public var isDeclModifier: Bool {
146146
switch kind {
147-
case .public, .static:
147+
case .public, .static, .private, .internal:
148148
return true
149149
default:
150150
return false

Sources/FrontEnd/TypeChecking/TypeChecker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4201,7 +4201,7 @@ struct TypeChecker {
42014201

42024202
if !tentative.isEmpty {
42034203
return tentative
4204-
} else if isQualified && ds.contains(where: { $0.kind == GenericParameterDecl.self }) {
4204+
} else if ds.contains(where: { $0.kind == GenericParameterDecl.self }) {
42054205
let membersOfConformedTraits = conformedTraits(of: context!.type, in: scopeOfUse)
42064206
.map({ lookup(name, memberOf: AnyType($0), exposedTo: scopeOfUse) })
42074207
return filterAccessible(Array(Set(membersOfConformedTraits.joined())))

Sources/IR/Analysis/DominatorTree.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import Utils
66
/// - A block `b1` in a control-flow graph *dominates* a block `b2` if every path from the entry to
77
/// `b2` must go through `b1`. By definition, every node dominates itself.
88
/// - A block `b1` *strictly dominates* a block `b2` if `b1` dominates `b2` and `b1 != b2`.
9-
/// - A block `b1` is the *immediately dominates* a block `b2` if `b1` strictly dominates `b2` and
10-
/// there is no block `b3` that strictly dominates `b2`.
9+
/// - A block `b1` *immediately dominates* a block `b2` if `b1` strictly dominates `b2` and there
10+
/// is no block `b3` that strictly dominates `b2`.
1111
///
1212
/// A dominator tree encodes the dominance relation of a control graph as a tree where a node is
1313
/// a basic blocks and its children are those it immediately dominates.

Sources/Utils/DoublyLinkedList.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
public struct DoublyLinkedList<Element> {
33

44
// The raw storage grows automatically when inserting an element would exceed its capability, but
5-
// it never shinks. A linked list keeps track of the free buckets in the buffer to reuse memory
5+
// it never shrinks. A linked list keeps track of the free buckets in the buffer to reuse memory
66
// after an element has been removed.
77

88
/// The address of an element in a doubly linked list.

0 commit comments

Comments
 (0)