Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(933)

Unified Diff: third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js

Issue 2449173002: DevTools: fix jsdoc validator to recognize `this' usage within arrow functions (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/golden.dat ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js
diff --git a/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js b/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js
index b769a2858c3a8f6eb438ef75fc07f9b5ab85afec..1d3093b453ddbb6cfe06b186d138eed468d65cf7 100644
--- a/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js
+++ b/third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/this.js
@@ -282,3 +282,37 @@ ReceiverTest.prototype = {
memberTwo: function(arg) {}
}
+
+/**
+ * @constructor
+ */
+function ReceiverWithArrowsTest()
+{
+ this._q = [];
+}
+
+ReceiverWithArrowsTest.prototype = {
+ /**
+ * @param {string} s
+ */
+ memberOne: function(s)
+ {
+ /**
+ * @param {string} a
+ * @this {!C}
dgozman 2016/10/25 18:08:27 @this annotations don't need "!"
+ */
+ function testArrowFunctionReferencingThis(a)
+ {
+ (x => this._q.push(x))(a);
+ }
+
+ /**
+ * @param {string} a
+ * @this {!C}
+ */
+ function testNestedArrowFunctionReferencingThis(a)
+ {
+ (x => (y => this._q.push(y))(x))(a);
+ }
+ }
+};
« no previous file with comments | « third_party/WebKit/Source/devtools/scripts/jsdoc-validator/tests/golden.dat ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698