File tree Expand file tree Collapse file tree 5 files changed +67
-3
lines changed
main/java/com/intellij/plugins/haxe/util
java/com/intellij/plugins/haxe/ide
resources/testData/annotation.semantic Expand file tree Collapse file tree 5 files changed +67
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
+ ## 1.4.41
3
+ * Bugfix: fixed type resolve regression for iterators
2
4
## 1.4.40
3
5
* Fixed: incomplete member list for anonymous strcutures
4
6
* Fixed: wrongfully marking wildcard import statement as unused
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ pluginName = Haxe Toolkit Support
6
6
pluginRepositoryUrl = https://github.com/HaxeFoundation/intellij-haxe
7
7
8
8
# SemVer format -> https://semver.org
9
- pluginVersion = 1.4.40
9
+ pluginVersion = 1.4.41
10
10
11
11
# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
12
12
platformType = IU
Original file line number Diff line number Diff line change @@ -734,9 +734,9 @@ private static HaxeResolveResult getHaxeClassResolveResultInternal(@Nullable Psi
734
734
return HaxeResolveResult .EMPTY ;
735
735
}
736
736
final HaxeExpression expression = iterable .getExpression ();
737
- if (expression instanceof HaxeReference ) {
737
+ if (expression instanceof HaxeReference reference ) {
738
738
739
- final HaxeResolveResult resolveResult = (( HaxeReference ) expression ) .resolveHaxeClass ();
739
+ final HaxeResolveResult resolveResult = reference .resolveHaxeClass ();
740
740
List <String > circularReferenceProtection = new LinkedList <>();
741
741
return searchForIterableTypeRecursively (resolveResult ,circularReferenceProtection );
742
742
Original file line number Diff line number Diff line change @@ -876,4 +876,9 @@ public void testTypeTagsShouldNotResolveToEnumValue2() throws Throwable {
876
876
myFixture .enableInspections (HaxeUnresolvedSymbolInspection .class );
877
877
doTestNoFixWithWarnings ("test/EnumWithClassNameValues.hx" );
878
878
}
879
+ @ Test
880
+ public void testIteratorTypeResolve () throws Throwable {
881
+ myFixture .enableInspections (HaxeUnresolvedSymbolInspection .class );
882
+ doTestNoFixWithWarnings ();
883
+ }
879
884
}
Original file line number Diff line number Diff line change
1
+ package ;
2
+
3
+ import haxe .ds .IntMap ;
4
+
5
+ class Test {
6
+
7
+ public static function main () {
8
+
9
+ // iterate map
10
+ var map = [ 1 => " one" , 2 => " two" ];
11
+ var intmap : IntMap <String > = [ 1 => " one" , 2 => " two" ];
12
+ var mapi : Map <Int , String > = [ 1 => " one" , 2 => " two" ];
13
+
14
+ for (key => value in map ) {
15
+ value .length * key ;
16
+ }
17
+ for (key => value in intmap ) {
18
+ value .length * key ;
19
+ }
20
+ for (key => value in mapi ) {
21
+ value .length * key ;
22
+ }
23
+
24
+ // iterate Array
25
+ var arr1 : Array <String >;
26
+ var arr2 = new Array <String >();
27
+
28
+ arr1 .iterator ();
29
+
30
+ for (value in arr1 ) {
31
+ value .length ;
32
+ }
33
+ for (value in arr2 ) {
34
+ value .length ;
35
+ }
36
+
37
+ for (key => value in arr1 ) {
38
+ // TODO mlo: fix test standard lib so this works (added after 4.0.5)
39
+ value .< warning descr = " Unresolved symbol" > length < / warning > * key ;
40
+ }
41
+ for (key => value in arr2 ) {
42
+ // TODO mlo: fix test standard lib so this works (added after 4.0.5)
43
+ value .< warning descr = " Unresolved symbol" > length < / warning > * key ;
44
+ }
45
+ // iterate string
46
+ var str : String ;
47
+ for (value in str ) {
48
+ // TODO mlo: fix test standard lib so this works
49
+ value .< warning descr = " Unresolved symbol" > length < / warning > ;
50
+ }
51
+
52
+ for (key => value in str ) {
53
+ value .length * key ;
54
+ }
55
+
56
+ }
57
+ }
You can’t perform that action at this time.
0 commit comments