From 7cbc514c3983c9d6dec8910428b8607802b18f20 Mon Sep 17 00:00:00 2001 From: NguyenND Date: Mon, 17 Aug 2026 16:52:04 -0400 Subject: [PATCH] Aug 17 - Fix constants.swift error --- JanitorialQC/Utils/Constants.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/JanitorialQC/Utils/Constants.swift b/JanitorialQC/Utils/Constants.swift index 3fecf65..4270cd7 100644 --- a/JanitorialQC/Utils/Constants.swift +++ b/JanitorialQC/Utils/Constants.swift @@ -109,8 +109,14 @@ nonisolated enum Constants { /// May change an issue's status / handler, and start a follow-up. /// Matches what the API actually accepts for these actions; the server /// remains the authority and additionally enforces facility scope. + /// + /// Built from `inspectorRoles` (already a Set) rather than from an + /// array literal: `[a, b, c].union(...)` does not compile, because the + /// literal is typed as Array before `.union` is looked up, and Array + /// has no such member — the annotation on the left does not reach back + /// into the receiver. static let issueActors: Set = - [admin, director, projectManager].union(inspectorRoles) + inspectorRoles.union([admin, director, projectManager]) static func isInspector(_ role: String) -> Bool { inspectorRoles.contains(role)