Skip to content

Ambiguous use of 'opacity' in Xcode 27.0 beta #35

Description

@LeoNatan

Describe the bug
When building CompactSlider with Xcode 27, the following error comes up:

/Users/lnatan/Library/Developer/Xcode/DerivedData/LNPopupUIExample-ahljqxhncpmffoallcvrjoukxlnn/SourcePackages/checkouts/CompactSlider/Sources/CompactSlider/ProminentCompactSliderStyle.swift:37:18: error: ambiguous use of 'opacity'
35 |                     endPoint: .trailing
36 |                 )
37 |                 .opacity(useGradientBackground && (configuration.isDragging || configuration.isHovering) ? 0.2 : 0)
   |                  `- error: ambiguous use of 'opacity'
38 |             )
39 |             .accentColor(

SwiftUI.View.opacity:2:36: note: found this candidate in module 'SwiftUI'
1 | protocol View {
2 | @inlinable nonisolated public func opacity(_ opacity: Double) -> some View
  |                                    `- note: found this candidate in module 'SwiftUI'
3 |   }
4 | 

SwiftUI.ShapeStyle.opacity:2:24: note: found this candidate in module 'SwiftUI'
1 | protocol ShapeStyle {
2 | @inlinable public func opacity(_ opacity: Double) -> some ShapeStyle
  |                        `- note: found this candidate in module 'SwiftUI'
3 |   }
4 | 

To Reproduce
Steps to reproduce the behavior:

  • Build with Xcode 27.0

Expected behavior
Should compile

Platform and version:

  • OS: iOS 27.0 beta 2

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions