File tree Expand file tree Collapse file tree 3 files changed +7
-16
lines changed
runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/types
runtime/src/test/java/org/enso/runtime/test Expand file tree Collapse file tree 3 files changed +7
-16
lines changed Original file line number Diff line number Diff line change 21
21
import org .enso .compiler .pass .resolve .Patterns$ ;
22
22
import org .enso .compiler .pass .resolve .TypeNames$ ;
23
23
import org .enso .compiler .pass .resolve .TypeSignatures$ ;
24
+ import org .enso .scala .wrapper .ScalaConversions ;
24
25
import org .slf4j .Logger ;
25
26
import org .slf4j .LoggerFactory ;
26
27
import scala .Option ;
27
28
import scala .collection .immutable .Seq ;
28
- import scala .collection .immutable .Seq$ ;
29
- import scala .jdk .javaapi .CollectionConverters ;
30
29
31
30
/**
32
31
* The compiler pass implementing the proof of concept of type inference.
@@ -143,13 +142,12 @@ public Seq<IRProcessingPass> precursorPasses() {
143
142
TypeSignatures$ .MODULE$ ,
144
143
StaticModuleScopeAnalysis .INSTANCE ,
145
144
TypeInferenceSignatures .INSTANCE );
146
- return CollectionConverters . asScala (passes ). toList ( );
145
+ return ScalaConversions . seq (passes );
147
146
}
148
147
149
148
@ Override
150
- @ SuppressWarnings ("unchecked" )
151
149
public Seq <IRProcessingPass > invalidatedPasses () {
152
- return ( Seq < IRProcessingPass >) Seq$ . MODULE$ . empty ();
150
+ return ScalaConversions . nil ();
153
151
}
154
152
155
153
@ Override
Original file line number Diff line number Diff line change 22
22
import org .slf4j .Logger ;
23
23
import org .slf4j .LoggerFactory ;
24
24
import scala .collection .immutable .Seq ;
25
- import scala .collection .immutable .Seq$ ;
26
- import scala .jdk .javaapi .CollectionConverters ;
27
25
28
26
// TODO it may make sense to merge this pass into StaticModuleScopeAnalysis, there is little benefit
29
27
// to keeping it separate
@@ -72,13 +70,12 @@ public Seq<IRProcessingPass> precursorPasses() {
72
70
TypeNames$ .MODULE$ ,
73
71
Patterns$ .MODULE$ ,
74
72
TypeSignatures$ .MODULE$ );
75
- return CollectionConverters . asScala (passes ). toList ( );
73
+ return ScalaConversions . seq (passes );
76
74
}
77
75
78
76
@ Override
79
- @ SuppressWarnings ("unchecked" )
80
77
public Seq <IRProcessingPass > invalidatedPasses () {
81
- return ( Seq < IRProcessingPass >) Seq$ . MODULE$ . empty ();
78
+ return ScalaConversions . nil ();
82
79
}
83
80
84
81
@ Override
Original file line number Diff line number Diff line change 8
8
import org .enso .compiler .pass .analyse .types .TypeRepresentation ;
9
9
import org .enso .persist .Persistance ;
10
10
import org .enso .pkg .QualifiedName ;
11
+ import org .enso .scala .wrapper .ScalaConversions ;
11
12
import org .junit .Test ;
12
- import scala .jdk .javaapi .CollectionConverters$ ;
13
13
14
14
/**
15
15
* Currently the static type inference pass is optional and it is not computed as part of the cache
16
16
* indexing.
17
17
*/
18
18
public class TypeMetadataPersistanceTest {
19
- private static <T > scala .collection .immutable .List <T > makeScalaList (List <T > list ) {
20
- return CollectionConverters$ .MODULE$ .asScala (list ).toList ();
21
- }
22
-
23
19
private static <T > T serde (Class <T > clazz , T l ) throws IOException {
24
20
var arr = Persistance .write (l , null );
25
21
var ref = Persistance .read (arr , null );
@@ -39,7 +35,7 @@ public void writeSomeInferredType() throws Exception {
39
35
}
40
36
41
37
private TypeRepresentation .TypeObject mockObject () {
42
- var fqn = new QualifiedName (makeScalaList (List .of ("mod" )), "Test" );
38
+ var fqn = new QualifiedName (ScalaConversions . seq (List .of ("mod" )). toList ( ), "Test" );
43
39
return new TypeRepresentation .TypeObject (fqn );
44
40
}
45
41
}
You can’t perform that action at this time.
0 commit comments