Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Token.isDeclModifier' #1638

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading