Skip to content

Commit 8627ddb

Browse files
author
Max Schaefer
committed
JavaScript: Adjust alert message.
1 parent 1a3e3ba commit 8627ddb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

javascript/ql/src/LanguageFeatures/InconsistentNew.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,6 @@ DataFlow::InvokeNode getFirstInvocation(Function f, boolean isNew) {
110110
from Function f, DataFlow::NewNode new, DataFlow::CallNode call
111111
where new = getFirstInvocation(f, true) and
112112
call = getFirstInvocation(f, false)
113-
select (FirstLineOf)f, capitalize(f.describe()) + " is invoked as a constructor $@, " +
114-
"and as a normal function $@.", new, "here", call, "here"
113+
select (FirstLineOf)f, capitalize(f.describe()) + " is sometimes invoked as a constructor " +
114+
"(for example $@), and sometimes as a normal function (for example $@).",
115+
new, "here", call, "here"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| m.js:1:8:1:22 | functio ... = x;\\n} | Function A is invoked as a constructor $@, and as a normal function $@. | c1.js:2:1:2:9 | new A(42) | here | c2.js:2:1:2:5 | A(23) | here |
2-
| tst.js:1:1:1:22 | functio ... = y;\\n} | Function Point is invoked as a constructor $@, and as a normal function $@. | tst.js:6:1:6:17 | new Point(23, 42) | here | tst.js:7:1:7:13 | Point(56, 72) | here |
1+
| m.js:1:8:1:22 | functio ... = x;\\n} | Function A is sometimes invoked as a constructor (for example $@), and sometimes as a normal function (for example $@). | c1.js:2:1:2:9 | new A(42) | here | c2.js:2:1:2:5 | A(23) | here |
2+
| tst.js:1:1:1:22 | functio ... = y;\\n} | Function Point is sometimes invoked as a constructor (for example $@), and sometimes as a normal function (for example $@). | tst.js:6:1:6:17 | new Point(23, 42) | here | tst.js:7:1:7:13 | Point(56, 72) | here |

0 commit comments

Comments
 (0)