Update to java 20 and some refactoring

This commit is contained in:
Daniel Holle 2023-06-22 09:34:15 +02:00
parent 4a18a81b33
commit 711aa70d48
26 changed files with 9 additions and 7 deletions

View File

@ -54,8 +54,8 @@ http://maven.apache.org/maven-v4_0_0.xsd">
<version>3.8.0</version>
<configuration>
<compilerArgs>--enable-preview</compilerArgs>
<source>19</source>
<target>19</target>
<source>20</source>
<target>20</target>
</configuration>
</plugin>
<plugin>
@ -112,8 +112,8 @@ http://maven.apache.org/maven-v4_0_0.xsd">
</repository>
</repositories>
<properties>
<maven.compiler.source>19</maven.compiler.source>
<maven.compiler.target>19</maven.compiler.target>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target>
<mainClass>de.dhbwstuttgart.core.ConsoleInterface</mainClass>
</properties>
<distributionManagement>

View File

@ -10,4 +10,5 @@ class TPHsAndGenerics2 {
m2(a, b){
return b;
}
}

View File

@ -3,7 +3,9 @@ import java.util.Vector;
public class TestVector {
m(v, w) {
w.addElement(id(v.elementAt(0)));
var a = v.elementAt(0);
var b = id(a);
w.addElement(b);
}
id(x) {

View File

@ -10,4 +10,3 @@ public class Lambda {
return lam1.apply(new Apply());
}
}

View File

@ -1,4 +1,3 @@
import java.lang.Integer;
import java.lang.Double;
import java.lang.String;
import java.lang.Long;

View File

@ -677,6 +677,7 @@ public abstract class GenerateGenerics {
if (!added) break;
}
System.out.println(chain + " " + chain.stream().map(e -> e.resolve().getVariance()).toList());
var variance = chain.get(0).resolve().getVariance();
if (variance != 1) continue;
var index = 0;