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

fix #22218 copy generated for non-copyable type #22447

Closed
wants to merge 1 commit into from

Conversation

bung87
Copy link
Collaborator

@bung87 bung87 commented Aug 11, 2023

deleted assert fails when I run testament locally.

@@ -1113,6 +1125,7 @@ proc moveOrCopy(dest, ri: PNode; c: var Con; s: var Scope, flags: set[MoveOrCopy
# We know the result will be a stmt so we use that fact to optimize
handleNestedTempl(ri, process, willProduceStmt = true)
else:
c.checkOpError(ri, attachedAsgn)
Copy link
Member

Choose a reason for hiding this comment

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

Instead it should not have been computed to be a cursor. Also, only in this one case we now get a more informative error message. Sorry, but you need to stop hacking things into random places just to make tests pass but instead need to understand the overall architecture of the compiler and look into existing logic and why it fails.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for whatever reason it will fails, the user code want do an assignment, but have already defined =copy as error.

@bung87 bung87 closed this Aug 13, 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