Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pure-attribute to Tuple types #64141

Closed
stidsborg opened this issue Jan 22, 2022 · 4 comments
Closed

Add Pure-attribute to Tuple types #64141

stidsborg opened this issue Jan 22, 2022 · 4 comments

Comments

@stidsborg
Copy link

Description

I noticed when reviewing some code that there was no IDE warning for the following code:
Tuple.Create(1,2)

It would be nice if the Pure-attribute could be added to the Tuple types thereby allowing the IDE to issue a warning in such cases.

Many thanks in advance,
/stidsborg

Reproduction Steps

Tuple.Create(1)

Expected behavior

IDE warning: 'Return value of pure method is not used'

Actual behavior

No warning

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jan 22, 2022
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@Wraith2
Copy link
Contributor

Wraith2 commented Jan 22, 2022

See #63570 (comment) for recent discussion on the topic of Pure annotations.

@ghost
Copy link

ghost commented Jan 22, 2022

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

I noticed when reviewing some code that there was no IDE warning for the following code:
Tuple.Create(1,2)

It would be nice if the Pure-attribute could be added to the Tuple types thereby allowing the IDE to issue a warning in such cases.

Many thanks in advance,
/stidsborg

Reproduction Steps

Tuple.Create(1)

Expected behavior

IDE warning: 'Return value of pure method is not used'

Actual behavior

No warning

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Author: stidsborg
Assignees: -
Labels:

area-System.Runtime, untriaged

Milestone: -

@stephentoub
Copy link
Member

Thanks. Closing as a duplicate of #34098 (comment).

@ghost ghost locked as resolved and limited conversation to collaborators Feb 21, 2022
@tannergooding tannergooding removed the untriaged New issue has not been triaged by the area owner label Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants