-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
errors with promotion and non-nilable owned #14941
Comments
When this issue is resolved, workaround changes to test/studies/shootout/chameneos-redux/elliot/chameneosredux-ejr.chpl should be removed. |
mppf
added a commit
to mppf/chapel
that referenced
this issue
Feb 20, 2020
mppf
added a commit
to mppf/chapel
that referenced
this issue
Feb 21, 2020
1 task
mppf
added a commit
that referenced
this issue
Feb 24, 2020
Errors for ownership transfer from non-nilable owned Resolves #13600. This PR adds compilation errors for ownership transfer from non-nilable owned. * Adjusts setInstantiationPoint to avoid resetting userInstantiationPointLoc when clearing the instantiation point in cleanups * Adds `FLAG_IGNORE_TRANSFER_ERRORS` to disable the new errors on a per-function basis and mark two array implementation functions with these * In checkForErroneousInitCopies, mark functions only called in erroneous copy functions with `FLAG_ERRONEOUS_COPY` so we can avoid raising transfer errors in them * Adds findNonNilableStoringNil, an analysis called in callDestructors and stored in nilChecking. This analysis raises an error for ownership transfer from non-nilable owned except in certain cases. It currently is connected to the expiring value analysis (following #13704) but we may make it stricter. * Fixes findCopyInitFn and findAssignFn for tuples * mark `init=` with `FLAG_ERRONEOUS_COPY` along with initCopy etc in resolution if it contains an error * in errorIfNonNilableType, don't raise errors for variables declared with `FLAG_NO_INIT` * in findLocationIgnoringInternalInlining, avoid an infinite loop if no calls were found to a function * change several TaskErrors methods to return/yield `owned Error?` instead of other types in order to allow the user to throw one of these without generating an ownership transfer error. * in SharedObject, factor clear logic into new method `doClear` so that `clear` can be more aggressively checked than deinit. * Add errors in `list` for copy-initialization from types that cannot be copied. * Adjust `list.pop` to move from the list into the return value rather than copying. This allows `list.pop` to be used on a list storing non-nilable owned. * Adjust quite a few tests to avoid the new errors. - [x] full local testing Reviewed by @benharsh - thanks! Future work: issues #14942 #14941 #14940
Both examples compile and run for me, and are clean under |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
I would expect both of the following programs to function but the result in errors after PR #14835. They produce different errors.
The text was updated successfully, but these errors were encountered: