Skip to content

Commit d573059

Browse files
committed
fix @SuppressWarnings for typedefs
1 parent deea441 commit d573059

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

checkstyle/checks/Check.hx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ class Check {
106106
return hasSuppressWarningsMeta (item.meta);
107107
}
108108
case ETypedef(d):
109+
if ((pos <= td.pos.max) && (pos >= td.pos.min)) {
110+
if (hasSuppressWarningsMeta (d.meta)) return true;
111+
}
109112
switch (d.data) {
110113
case TAnonymous(fields):
111114
for (field in fields) {

test/DynamicCheckTest.hx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ class DynamicTests {
7272
typedef Test3a = {
7373
var count1:Int;
7474
var count2:Dynamic;
75-
}";
75+
}
76+
77+
@SuppressWarnings('checkstyle:Dynamic')
78+
typedef Test3b = Array<Dynamic>;";
7679

7780
public static inline var TEST1:String = "
7881
class Test {

0 commit comments

Comments
 (0)