File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
javascript/ql/src/LanguageFeatures Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,12 @@ class RootDestructuringPattern extends BindingPattern {
35
35
/** Gets the first occurrence of the conflicting binding `name`. */
36
36
VarDecl getFirstClobberedVarDecl ( string name ) {
37
37
hasConflictingBindings ( name ) and
38
- result = min ( VarDecl decl | decl = getABindingVarRef ( ) and decl .getName ( ) = name | decl order by decl .getLocation ( ) .getStartLine ( ) , decl .getLocation ( ) .getStartColumn ( ) )
38
+ result =
39
+ min ( VarDecl decl |
40
+ decl = getABindingVarRef ( ) and decl .getName ( ) = name
41
+ |
42
+ decl order by decl .getLocation ( ) .getStartLine ( ) , decl .getLocation ( ) .getStartColumn ( )
43
+ )
39
44
}
40
45
41
46
/** Holds if variables in this pattern may resemble type annotations. */
54
59
w = p .getABindingVarRef ( ) and
55
60
w .getName ( ) = n and
56
61
v != w and
57
- if p .resemblesTypeAnnotation ( ) then
58
- message = "The pattern variable '" + n + "' appears to be a type, but is a variable previously bound $@."
59
- else
60
- message = "Repeated binding of pattern variable '" + n + "' previously bound $@."
62
+ if p .resemblesTypeAnnotation ( )
63
+ then
64
+ message =
65
+ "The pattern variable '" + n +
66
+ "' appears to be a type, but is a variable previously bound $@."
67
+ else message = "Repeated binding of pattern variable '" + n + "' previously bound $@."
61
68
select w , message , v , "here"
You can’t perform that action at this time.
0 commit comments