 ; scope: we define which declarations are visible
 ; ================================================
 
-(defprotocol scope
+(defprotocol Scope
   ; for example in a BlockStmt containing statements [a b c d e], when solving symbols in the context of c
   ; it will contains only statements preceeding it [a b]
   (solveSymbol [this context nameToSolve])
   ; solveClass solve on a subset of the elements of solveSymbol
   (solveClass [this context nameToSolve]))
 
-(extend-protocol scope
+(extend-protocol Scope
   nil
   (solveClass [this context nameToSolve] (typeSolver nameToSolve)))
 
 (defn declare-symbol? [symbol-name symbols-declarator]
   (get (declared-symbols symbols-declarator) symbol-name))
 
-(extend-protocol scope
+(extend-protocol Scope
   com.github.javaparser.ast.Node
   (solveSymbol [this context nameToSolve]
     (solveSymbol (.getParentNode this) this nameToSolve))
   (solveClass [this context nameToSolve]
     (solveClass (.getParentNode this) this nameToSolve)))
 
-(extend-protocol scope
+(extend-protocol Scope
   BlockStmt
   (solveSymbol [this context nameToSolve]
     (let [elementsToConsider (if (nil? context) (.getStmts this) (preceedingChildren (.getStmts this) context))

        correspondingClasses (map typeSolver importNames)]
    (first correspondingClasses)))

(extend-protocol scope
  com.github.javaparser.ast.CompilationUnit
  ; TODO consider imports
  (solveClass [this context nameToSolve]

        matchingParameters (filter (fn [p] (= nameToSolve (.getName (.getId p)))) parameters)]
    (first matchingParameters)))

(extend-protocol Scope
  com.github.javaparser.ast.body.MethodDeclaration
  (solveSymbol [this context nameToSolve]
    (or (solve-among-parameters this nameToSolve)
