Skip to content

Introduce explicit downcast refactoring if a variable requires a cast to compile#41371

Merged
y87feng merged 98 commits intodotnet:masterfrom
y87feng:40967
Mar 16, 2020
Merged

Introduce explicit downcast refactoring if a variable requires a cast to compile#41371
y87feng merged 98 commits intodotnet:masterfrom
y87feng:40967

Conversation

@y87feng
Copy link
Contributor

@y87feng y87feng commented Feb 3, 2020

Implemented code fix for error code: CS0266, CS1503
Issue link: #40967

@y87feng y87feng requested a review from a team as a code owner February 3, 2020 19:30
Copy link
Contributor

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

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

lots of safety concerns. but a great start!

@CyrusNajmabadi
Copy link
Contributor

Hi @y87feng ! Thanks for the contribution. Overall this is a great start. The primary things we'll need here are good docs in teh code explaining why what it is doing is correct (as it's not self evident), as well as a lot of beefing up the safety of hte feature. i.e. the code currently makes a ton of assumptions about the results it may get back from certain calls. This is not safe and may absolutely crash in existin code scenarios (or future changes as the compiler/langauge moves forward).

I'm happy to help out with more information on this if you need it!

Copy link
Contributor

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

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

A lot nicer! Needs some comments in code to help with things, and some small refactoring. But overall very close!

@y87feng y87feng requested a review from CyrusNajmabadi March 13, 2020 22:46
Copy link
Contributor

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

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

Looks fantastic! 📦

Julia Feng and others added 5 commits March 13, 2020 16:16
…icitCastCodeFixProvider.cs

Co-Authored-By: CyrusNajmabadi <cyrus.najmabadi@gmail.com>
…icitCastCodeFixProvider.cs

Co-Authored-By: CyrusNajmabadi <cyrus.najmabadi@gmail.com>
@y87feng y87feng merged commit 9511dc0 into dotnet:master Mar 16, 2020
@ghost ghost added this to the Next milestone Mar 16, 2020
@CyrusNajmabadi
Copy link
Contributor

Congratulations!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants