From 848730e40935254031f5a461959a9c23a6cdcc2d Mon Sep 17 00:00:00 2001 From: Chuck Grindel Date: Fri, 13 Oct 2023 10:42:07 -0600 Subject: [PATCH] fix: shadow parameter warning and add concurrency check to CI (#116) Closes #115. --- .github/workflows/ci.yml | 4 ++++ Sources/Truth/TypeAssertions.swift | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bcf832..94b184b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: # Every day at 11:17 UTC. - cron: '17 11 * * *' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: macos_build: runs-on: macos-13 diff --git a/Sources/Truth/TypeAssertions.swift b/Sources/Truth/TypeAssertions.swift index b0ea87f..2aa4c1b 100644 --- a/Sources/Truth/TypeAssertions.swift +++ b/Sources/Truth/TypeAssertions.swift @@ -1,15 +1,15 @@ public extension Subject { /// Asserts that a subject is the specified type. - @discardableResult func isA( - _ expectedType: T.Type, + @discardableResult func isA( + _ expectedType: ET.Type, file: StaticString = #file, line: UInt = #line, - _ subjectConsumer: (Subject) throws -> Void = { _ in } + _ subjectConsumer: (Subject) throws -> Void = { _ in } ) -> Self { guard continueAssertions else { return self } - guard let expected = actual as? T else { + guard let expected = actual as? ET else { fail( file: file, line: line,