Fix outstanding issues. - #603
Open
MatyasKriz wants to merge 4 commits into
Open
MatyasKriz wants to merge 4 commits into
MatyasKriz wants to merge 4 commits into
Conversation
The crawler recognized `static` and `final` modifiers but not the `class` keyword, so `class func`/`class var` members leaked into generated mocks as instance-level overrides that failed to compile. Skip them with a verbose log message, matching static member handling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cuckoo 1.x wrapped mocks of @available(..., unavailable) members in platform checks (PR #423); the 2.x templates lost them in three places: MockTemplate never emitted the guards, VerificationProxyTemplate missed them for properties, and Initializer.serialize() never exposed the unavailablePlatformsCheck keys so NopImplStubTemplate rendered empty. Adds a protocol fixture covering single/multi-platform unavailable properties, methods, and an initializer requirement. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Protocols inheriting Actor/AnyActor (directly or transitively) now produce `actor` mocks and stubs instead of classes. Detection mirrors the isNSObjectProtocol mechanism but always runs. Actor mocks declare cuckoo_manager and __defaultImplStub as nonisolated(unsafe) and enableDefaultImplementation as nonisolated to satisfy the non-isolated protocol requirements. Limitation: non-async members of actor mocks cannot forward to a default implementation (would require synchronous cross-actor access), so their defaultCall crashes like protocol superclass calls; async members forward correctly via await. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Inout arguments are boxed in a new Cuckoo.InoutContainer reference type
inside the mock's method body: the box flows through matching and the
stub's action, superclass/default calls route through &box.value, and a
defer writes the final value back to the caller's variable. Matchers
and verify() see the initial (pre-mutation) value via an independent
snapshot box in escapingParameters, mirroring by-value semantics.
Single-inout methods get an ergonomic overload so stubs can write
`.then { value in value = 999 }`; methods mixing inout with other
parameters expose the container in the tuple (`params.0.value = ...`).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
MatyasKriz
force-pushed
the
matty/fix/outstanding-issues
branch
2 times, most recently
from
September 5, 2026 14:49
dee1f81 to
521dd7e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.