Branch: refs/heads/main
Revision: 3d93d5384a3230239d7b6a239954f2b136b0e2fb
Author: DanilaFe
Link: Dyno: fix detecting genericity in the presence generic with default fields by DanilaFe · Pull Request #27928 · chapel-lang/chapel · GitHub
Log Message:
Dyno: fix detecting genericity in the presence generic with default fields (#27928)
Prior to this PR, dyno considered generic-with-default types concrete
when they were used as standalone field expressions in a field. Thus,
myField: record (eg) would be considered generic. This is not correct,
since without (?), generic-with-default types resolve to their
concrete value.
This PR fixes that.
This PR was motivated by
test/types/records/generic/warn-field-generic-declared-type.chpl. That
test locks down warnings for memory-management-generic and
generic-without-? fields. So, to make that test pass, this PR also
implements those warnings.
Reviewed by @benharsh -- thanks!
Testing
- dyno tests
- paratest
- paratest --dyno-resolve-only
Diff:
M frontend/include/chpl/resolution/resolution-error-classes-list.h
M frontend/include/chpl/resolution/resolution-queries.h
M frontend/lib/resolution/resolution-error-classes-list.cpp
M frontend/lib/resolution/resolution-queries.cpp
M frontend/lib/resolution/resolution-types.cpp
M frontend/test/resolution/testGenericDefaults.cpp
M frontend/test/resolution/testMethodCalls.cpp
A test/types/records/generic/warn-field-generic-declared-type-dyno.chpl
A test/types/records/generic/warn-field-generic-declared-type-dyno.compopts
A test/types/records/generic/warn-field-generic-declared-type-dyno.good
A test/types/records/generic/warn-field-generic-declared-type-dyno.noexec
https://github.com/chapel-lang/chapel/pull/27928.diff