Skip to content

'Mock' is ambiguous for type lookup in this context when using sourcery-generated mock types #129

@eedmond

Description

@eedmond

🐞 Describe the bug

The auto-generated mocks using MockSwift.template and Sourcery have name conflicts with other classes in my project. Specifically, Mock and Predicate.

📝 To Reproduce

Generate mocks in a project that already defines a Mock and/or Predicate class.

🔍 Expected behavior

It would be great if MockSwift.template included the MockSwift. prefix on the Mock and Predicate classes to avoid this name conflict.

⚙️ Environment

MockSwift version: 1.1.0
OS:

  • macOS Seqoia 15.2
  • Linux x.x.x

Swift version: 6.1
Xcode version: private version

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions