@Test public void testThatScopeIsCloned() { Scope s = new Scope(); s.add("v", BasicType.INT, Optional.empty()); IInjectionPoint injectionPoint = new InjectionPoint(null, false, false, s) { @Override public void inject(Stmt stmt) { throw new RuntimeException(); } @Override public Stmt getNextStmt() { throw new RuntimeException(); } @Override public boolean hasNextStmt() { throw new RuntimeException(); } @Override public void replaceNext(Stmt stmt) { throw new RuntimeException(); } }; s.add("w", BasicType.INT, Optional.empty()); assertNull(injectionPoint.scopeAtInjectionPoint().lookupType("w")); }
@Override public final Scope scopeAtInjectionPoint() { return scope; }
InjectionPoint implements IInjectionPoint { @Override public final Scope scopeAtInjectionPoint() { return scope; } }
InjectionPoint implements IInjectionPoint { @Override public final Scope scopeAtInjectionPoint() { return scope; } InjectionPoint(FunctionDefinition enclosingFunction, boolean inLoop,
      boolean inSwitch,
      Scope scope); }
InjectionPoint implements IInjectionPoint { @Override public final Scope scopeAtInjectionPoint() { return scope; } InjectionPoint(FunctionDefinition enclosingFunction, boolean inLoop,
      boolean inSwitch,
      Scope scope); @Override final FunctionDefinition getEnclosingFunction(); @Override final boolean inLoop(); @Override final boolean inSwitch(); @Override final Scope scopeAtInjectionPoint(); }
InjectionPoint implements IInjectionPoint { @Override public final Scope scopeAtInjectionPoint() { return scope; } InjectionPoint(FunctionDefinition enclosingFunction, boolean inLoop,
      boolean inSwitch,
      Scope scope); @Override final FunctionDefinition getEnclosingFunction(); @Override final boolean inLoop(); @Override final boolean inSwitch(); @Override final Scope scopeAtInjectionPoint();  }