You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ~= infix operator declaration should use the same precedence (ComparisonPrecedence) as Swift's built-in operator.
Actual behaviour:
Node.swift defines the ~= infix operator as follows:
infix operator ~=
This causes the operator to have DefaultPrecedence resulting in the following build error whenever the ~= operator is used with other types in a Swift file that imports Fuzi:
Ambiguous operator declarations found for operator
This can be resolved by re-defining the ~= operator as follows at the point of use:
infix operator ~=: ComparisonPrecedence
However this should not be necessary.
Suggested Solution
Change the operator definition in Node.swift to:
infix operator ~=: ComparisonPrecedence
Environment
Package Manager:
SPM, version 5.5
Fuzi version: 3.1.3
Xcode version: 13.2.1
How to reproduce:
Open the attached project
Build
Xcode will emit a build error
Comment out operator definition in Sources/FuziTest/FuziTest.swift to fix error.
Description:
The
~=
infix operator declaration should use the same precedence (ComparisonPrecedence
) as Swift's built-in operator.Node.swift
defines the~=
infix operator as follows:infix operator ~=
This causes the operator to have
DefaultPrecedence
resulting in the following build error whenever the~=
operator is used with other types in a Swift file that imports Fuzi:This can be resolved by re-defining the
~=
operator as follows at the point of use:However this should not be necessary.
Suggested Solution
Change the operator definition in
Node.swift
to:Environment
Package Manager:
Fuzi version: 3.1.3
Xcode version: 13.2.1
How to reproduce:
Sources/FuziTest/FuziTest.swift
to fix error.FuziTest.zip
The text was updated successfully, but these errors were encountered: