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 2121import org .enso .compiler .pass .resolve .Patterns$ ;
2222import org .enso .compiler .pass .resolve .TypeNames$ ;
2323import org .enso .compiler .pass .resolve .TypeSignatures$ ;
24+ import org .enso .scala .wrapper .ScalaConversions ;
2425import org .slf4j .Logger ;
2526import org .slf4j .LoggerFactory ;
2627import scala .Option ;
2728import scala .collection .immutable .Seq ;
28- import scala .collection .immutable .Seq$ ;
29- import scala .jdk .javaapi .CollectionConverters ;
3029
3130/**
3231 * The compiler pass implementing the proof of concept of type inference.
@@ -143,13 +142,12 @@ public Seq<IRProcessingPass> precursorPasses() {
143142 TypeSignatures$ .MODULE$ ,
144143 StaticModuleScopeAnalysis .INSTANCE ,
145144 TypeInferenceSignatures .INSTANCE );
146- return CollectionConverters . asScala (passes ). toList ( );
145+ return ScalaConversions . seq (passes );
147146 }
148147
149148 @ Override
150- @ SuppressWarnings ("unchecked" )
151149 public Seq <IRProcessingPass > invalidatedPasses () {
152- return ( Seq < IRProcessingPass >) Seq$ . MODULE$ . empty ();
150+ return ScalaConversions . nil ();
153151 }
154152
155153 @ Override
Original file line number Diff line number Diff line change 2222import org .slf4j .Logger ;
2323import org .slf4j .LoggerFactory ;
2424import scala .collection .immutable .Seq ;
25- import scala .collection .immutable .Seq$ ;
26- import scala .jdk .javaapi .CollectionConverters ;
2725
2826// TODO it may make sense to merge this pass into StaticModuleScopeAnalysis, there is little benefit
2927// to keeping it separate
@@ -72,13 +70,12 @@ public Seq<IRProcessingPass> precursorPasses() {
7270 TypeNames$ .MODULE$ ,
7371 Patterns$ .MODULE$ ,
7472 TypeSignatures$ .MODULE$ );
75- return CollectionConverters . asScala (passes ). toList ( );
73+ return ScalaConversions . seq (passes );
7674 }
7775
7876 @ Override
79- @ SuppressWarnings ("unchecked" )
8077 public Seq <IRProcessingPass > invalidatedPasses () {
81- return ( Seq < IRProcessingPass >) Seq$ . MODULE$ . empty ();
78+ return ScalaConversions . nil ();
8279 }
8380
8481 @ Override
Original file line number Diff line number Diff line change 88import org .enso .compiler .pass .analyse .types .TypeRepresentation ;
99import org .enso .persist .Persistance ;
1010import org .enso .pkg .QualifiedName ;
11+ import org .enso .scala .wrapper .ScalaConversions ;
1112import org .junit .Test ;
12- import scala .jdk .javaapi .CollectionConverters$ ;
1313
1414/**
1515 * Currently the static type inference pass is optional and it is not computed as part of the cache
1616 * indexing.
1717 */
1818public class TypeMetadataPersistanceTest {
19- private static <T > scala .collection .immutable .List <T > makeScalaList (List <T > list ) {
20- return CollectionConverters$ .MODULE$ .asScala (list ).toList ();
21- }
22-
2319 private static <T > T serde (Class <T > clazz , T l ) throws IOException {
2420 var arr = Persistance .write (l , null );
2521 var ref = Persistance .read (arr , null );
@@ -39,7 +35,7 @@ public void writeSomeInferredType() throws Exception {
3935 }
4036
4137 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" );
4339 return new TypeRepresentation .TypeObject (fqn );
4440 }
4541}
You can’t perform that action at this time.
0 commit comments