Skip to content

Use C#9 Covariant return types feature for Clone() implementation for type safety and reduce number of casts#261

Merged
alex-kulakov merged 19 commits intoDataObjects-NET:masterfrom
servicetitan:upstream/covariantReturnTypes
Jul 19, 2023
Merged

Use C#9 Covariant return types feature for Clone() implementation for type safety and reduce number of casts#261
alex-kulakov merged 19 commits intoDataObjects-NET:masterfrom
servicetitan:upstream/covariantReturnTypes

Conversation

@SergeiPavlov
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread Orm/Xtensive.Orm/Sql/Dml/Expressions/SqlUserFunctionCall.cs Outdated
Comment thread Orm/Xtensive.Orm/Sql/Dml/Expressions/SqlFunctionCall.cs Outdated
Comment thread Orm/Xtensive.Orm/Sql/Dml/Expressions/SqlCustomFunctionCall.cs Outdated
Comment thread Orm/Xtensive.Orm/Sql/Dml/Hints/SqlForceJoinOrderHint.cs Outdated
@alex-kulakov
Copy link
Copy Markdown
Contributor

Please, do not merge master to here before fixing building issues.

SergeiPavlov and others added 3 commits December 27, 2022 09:00
Co-authored-by: Alexey Kulakov <alexey.kulakov@dataobjects.net>
Co-authored-by: Alexey Kulakov <alexey.kulakov@dataobjects.net>
Co-authored-by: Alexey Kulakov <alexey.kulakov@dataobjects.net>
@SergeiPavlov
Copy link
Copy Markdown
Contributor Author

Please, do not merge master to here before fixing building issues.

THe build is fixed

@alex-kulakov
Copy link
Copy Markdown
Contributor

THe build is fixed

Nice. thank you

@alex-kulakov
Copy link
Copy Markdown
Contributor

Error appeared on our build server after merge: Orm\Xtensive.Orm\Sql\Dml\Expressions\SqlExtract.cs(75,62): error CS8821: A static anonymous function cannot contain a reference to 'this' or 'base'.

@SergeiPavlov
Copy link
Copy Markdown
Contributor Author

Error appeared on our build server after merge: Orm\Xtensive.Orm\Sql\Dml\Expressions\SqlExtract.cs(75,62): error CS8821: A static anonymous function cannot contain a reference to 'this' or 'base'.

Thank you!
Fixed.

@alex-kulakov
Copy link
Copy Markdown
Contributor

@SergeiPavlov, please, merge changes from master, I'll pull-request to st fork on top of this merge to fix minor issues with SqlTruncateTable cloning and make it ready to merge. Merge of SqlInsert will cause some problems.

Copy link
Copy Markdown
Contributor

@alex-kulakov alex-kulakov left a comment

Choose a reason for hiding this comment

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

Everything seems to be good except for new node - SqlTruncateTable, which has old cloning which breaks building. I would also add line between field and property in the SqlNodeCloneContext, I suggested this change for you to be easy to apply.

There are some merge issues, partially from master but they were resolved in master. SqlInsert will be problematic merge

Comment thread Orm/Xtensive.Orm/Sql/Internals/SqlNodeCloneContext.cs
@SergeiPavlov
Copy link
Copy Markdown
Contributor Author

Fixed build

I would also add line between field and property in the SqlNodeCloneContext, I suggested this change for you to be easy to apply.

Do you mean this line? https://github.com/DataObjects-NET/dataobjects-net/pull/261/files#diff-84e02d093b91d61040b7c79479c67936f1a88cfd9cca87c9f6e3a8899566c166R13

It already presents

@alex-kulakov
Copy link
Copy Markdown
Contributor

Thank you.

It already presents

It wasn't, otherwise I wouldn't be able to make suggestion, right? I don't know what happened. Anyway, this is good that it is exists. Thank you once again

@alex-kulakov alex-kulakov merged commit a3cf2d4 into DataObjects-NET:master Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants