Skip to content

Conversation

@rosskuehl
Copy link
Contributor

@rosskuehl rosskuehl commented Dec 20, 2022

Resolves #14011 and #14418

It appears that the operator's display name was being passed to IsLogicalTernaryOperator instead of the logical name, causing the displayName <> logicalName check to always return false.

I added a test to verify that the change is effective and more descriptive variable names to help clarify the usage.

@rosskuehl rosskuehl requested a review from a team as a code owner December 20, 2022 03:06
@rosskuehl rosskuehl changed the title use logical operator name to check for logical ternary operator Fix: Dynamic assignment operator warning Dec 20, 2022
Copy link
Contributor

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and for the test :)

@psfinaki psfinaki enabled auto-merge (squash) December 20, 2022 20:26
@psfinaki psfinaki merged commit c8acf2a into dotnet:main Dec 20, 2022
let ``Implementing dynamic assignment operator does not produce a warning`` version =
Fsx """
type T = T with
static member inline (?<-) (f, x, y) = f x y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could some test also include a usage of this operator, maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Incorrect warning about tupled arguments

5 participants