New Issue: Extend warning for 'super.this' and 'this.this' to be triggered anywhere an import statement

19661, "lydia-duncan", "Extend warning for 'super.this' and 'this.this' to be triggered anywhere an import statement", "2022-04-19T20:51:36Z"

Summary of Problem

#TBD removes a compiler error for import paths that only include super or this. In the case where super or this is immediately followed by a this at the start of the path, it will also generate a warning. However, this warning does not get generated when such patterns happen later in the path (e.g. super.super.this will fail to warn while super.this will warn). It is not incorrect code to write such patterns, but it is unnecessary and adds no value.

Steps to Reproduce

Source Code:

module bar {
  var x: int;

  module foo {
    module innermost {
      proc main() {
        import super.super.this;

Compile command:
chpl foo.chpl

Execution command:
Not relevant, the program compiles but should also have generated a warning

Associated Future Test(s):
test/visibility/import/superImport/superSuperThisWarning.chpl #TBD

Configuration Information

  • Output of chpl --version: chpl version 1.27.0 pre-release