Skip to content
Snippets Groups Projects
Select Git revision
  • f50d24a9fa16305923a84893adaf5ec9d50dfec4
  • develop default protected
  • support-for-intellij-25.1
  • chore/support-for-intellijj-2024.3
  • feature/references
  • feature/commenter-for-aspect-files
  • feature/link-generated-code-and-definition
  • main
  • legacy
  • v0.3.5 protected
  • v0.3.4 protected
  • v0.3.3 protected
  • v0.3.2 protected
  • v0.3.1 protected
  • v0.3.0 protected
  • v0.2.0 protected
16 results

settings.gradle.kts

Blame
  • A.java 1.03 KiB
    package p1;
    
    public abstract class ClassA {
    
      int fieldA;
      int fieldB;
    
      public ClassA(int constructorParameterA) {
        int localConstructorVarA = 0;
      }
    
      public void methodNameA(int parameterA) {
        int localVarA = 1;
        int localVarB = 1;
    
        {
          int localVarInBlockA = 2;
    
          // this is shadowed (and forbidden)
          int localVarA = 3;
        }
    
        class Local {
          {
            for (int localVarA = 0; localVarA < 10; localVarA++) System.out.println(localVarA);
          }
        }
    
        // this is shadowed (over two levels, not forbidden)
        int fieldA;
    
        try (
            // this is forbidden
            java.util.zip.ZipFile localVarB = new java.util.zip.ZipFile("zipFileName");
    
            // this is okay
            java.io.BufferedWriter fieldB = java.nio.file.Files.newBufferedWriter(null)
        ) { /* do stuff */ } catch (java.io.IOException e) {/* do stuff */}
      }
    
      // this does not appear as a scope (and, more importantly, the parameters are not added anywhere else)
      public abstract void methodNameB(int parameterForAbstractMethodB);
    }