Branch: refs/heads/main
Revision: 9e09071
Author: mppf
Link: Unavailable
Log Message:
Merge pull request #20638 from mppf/follow-20492
Fixups following deprecating some class patterns
Follow-up to PR #20492
Resolves https://github.com/Cray/chapel-private/issues/3674
This PR:
- fixes a parsing bug where a
Dot
could have anullptr
child if the
RHS was an invalid expression as withvar myC = new owned C(42); var myC2 = (new owned myC).borrow();
which led to segmentation faults
later in compilation - adds testing of owned-to-shared casting (but note that varying
nilability in these causes compilation failure -- see future work) - removes temporary
.notest
files added in PR #20492 as a workaround
and update a few tests that had issues - adjusts tests that are testing all combinations of
owned/shared/nilable/nonnilable to leave the source code testing the
case it was but just show a deprecation error for the deprecated
cases. In the future if these become full errors, these tests should
just have their .good files updated with the errors.
Future Work
- control flow expressions and lifetimes of temporaries · Issue #10879 · chapel-lang/chapel · GitHub
- Should casting owned to shared allow changing nilability? · Issue #20647 · chapel-lang/chapel · GitHub
- what should we do with owned.create and shared.create? · Issue #20648 · chapel-lang/chapel · GitHub
Reviewed by @daviditen - thanks!
-
full local testing
-
full gasnet testing
Modified Files:
A test/classes/casts/owned-to-shared-cast-nilable-to-nilable.chpl
A test/classes/casts/owned-to-shared-cast-nilable-to-nilable.good
A test/classes/casts/owned-to-shared-cast-nilable-to-nonnil.chpl
A test/classes/casts/owned-to-shared-cast-nilable-to-nonnil.good
A test/classes/casts/owned-to-shared-cast-nonnil-to-nilable.chpl
A test/classes/casts/owned-to-shared-cast-nonnil-to-nilable.good
A test/classes/casts/owned-to-shared-cast-nonnil-to-nonnil.chpl
A test/classes/casts/owned-to-shared-cast-nonnil-to-nonnil.good
R test/classes/deitz/class/nil2.notest
R test/classes/errors/newValueNotType2.notest
R test/classes/errors/nilability-assign/assign-oknil-shared-from-oknil-owned.notest
R test/classes/errors/nilability-init-field-arg/init-field-arg-nonnil-shared-from-oknil-owned.notest
R test/classes/errors/nilability-init-field-arg/init-field-arg-oknil-shared-from-nonnil-owned.notest
R test/classes/ferguson/delete-free/owned-shared-fields.notest
R test/classes/initializers/promotion/new-promoted.notest
R test/expressions/new-expr/has-arg-list.notest
R test/multilocale/deitz/needMultiLocales/test_frag_main.notest
R test/multilocale/diten/localBlock/needMultiLocales/localBlock6.notest
M compiler/dyno/lib/parsing/ParserContextImpl.h
M compiler/dyno/lib/uast/Dot.cpp
M modules/internal/SharedObject.chpl
M test/classes/deitz/class/nil2.chpl
M test/classes/delete-free/shared/shared-from-borrow.chpl
M test/classes/errors/nilability-assign/assign-nonnil-shared-from-nonnil-owned.chpl
M test/classes/errors/nilability-assign/assign-nonnil-shared-from-nonnil-owned.good
M test/classes/errors/nilability-assign/assign-oknil-shared-from-nonnil-owned.chpl
M test/classes/errors/nilability-assign/assign-oknil-shared-from-nonnil-owned.good
M test/classes/errors/nilability-assign/assign-oknil-shared-from-oknil-owned.chpl
M test/classes/errors/nilability-assign/assign-oknil-shared-from-oknil-owned.good
M test/classes/errors/nilability-init-field-arg/init-field-arg-nonnil-shared-from-nonnil-owned.chpl
M test/classes/errors/nilability-init-field-arg/init-field-arg-nonnil-shared-from-nonnil-owned.good
M test/classes/errors/nilability-init-field-arg/init-field-arg-nonnil-shared-from-oknil-owned.chpl
M test/classes/errors/nilability-init-field-arg/init-field-arg-nonnil-shared-from-oknil-owned.good
M test/classes/errors/nilability-init-field-arg/init-field-arg-oknil-shared-from-nonnil-owned.chpl
M test/classes/errors/nilability-init-field-arg/init-field-arg-oknil-shared-from-nonnil-owned.good
M test/classes/errors/nilability-init-field-arg/init-field-arg-oknil-shared-from-oknil-owned.chpl
M test/classes/errors/nilability-init-field-arg/init-field-arg-oknil-shared-from-oknil-owned.good
M test/classes/errors/nilability-init-var/init-var-nonnil-shared-from-nonnil-owned.chpl
M test/classes/errors/nilability-init-var/init-var-nonnil-shared-from-nonnil-owned.good
M test/classes/ferguson/delete-free/owned-shared-fields.chpl
M test/classes/initializers/promotion/new-promoted.chpl
M test/classes/initializers/promotion/new-promoted.good
M test/multilocale/deitz/needMultiLocales/test_frag_main.chpl
M test/multilocale/diten/localBlock/needMultiLocales/localBlock6.chplCompare: Comparing e38fcf300dce...9e090717911c · chapel-lang/chapel · GitHub