Skip to content

Commit

Permalink
Merge pull request #1638 from hylo-lang/decl-modifier
Browse files Browse the repository at this point in the history
Fix 'Token.isDeclModifier'
  • Loading branch information
kyouko-taiga authored Dec 23, 2024
2 parents 734e7be + 83c5cde commit f88d5ac
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/FrontEnd/Parse/Token.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Sources/FrontEnd/TypeChecking/TypeChecker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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())))
Expand Down
4 changes: 2 additions & 2 deletions Sources/IR/Analysis/DominatorTree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Sources/Utils/DoublyLinkedList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
public struct DoublyLinkedList<Element> {

// 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.
Expand Down

0 comments on commit f88d5ac

Please sign in to comment.