Falsche Varianz #217

Open
opened 2023-06-16 11:09:15 +00:00 by dholle · 2 comments
Owner

Beispiel:

import java.util.Vector;

public class TestVector {

m(v, w) {
    var a = v.elementAt(0);
    var b = id(a);
	w.addElement(b);
}

id(x) {
	return x;
}

}

class TestVector {

TestVector()({
super(());
})::TPH AP
TPH N m(TPH O v, TPH P w)({
TPH Q a;
(a)::TPH Q = ((v)::TPH O.elementAt Signature: TPH S, TPH T)::TPH U;
TPH W b;
(b)::TPH W = ((this)::TPH X.id Signature: [TPH Y, TPH Z]((a)::TPH Q))::TPH AA;
((w)::TPH P.addElement Signature: [TPH AC, TPH AD]((b)::TPH W))::TPH AE;
return;
})::TPH AG

TPH AH id(TPH AI x)({
return (x)::TPH AI;
})::TPH AJ

TestVector()({
super(());
})::TPH AM

}

Constraints: [(AI < AH), (W < ADA), (ACZ < U), (U < Q), (AH < AA), (AA < W), (Q < AI)]

Der Fehler tritt nur auf, wenn der Test alleine ausgeführt wird.
Die Varianzen sind:
[ACZ, U, Q, AA, W, ADA]
[ 1, 1, 1, -1, -1, 1]

ADA müsste eigentlich -1 bekommen.

Beispiel: import java.util.Vector; public class TestVector { m(v, w) { var a = v.elementAt(0); var b = id(a); w.addElement(b); } id(x) { return x; } } class TestVector { TestVector()({ super(()); })::TPH AP TPH N m(TPH O v, TPH P w)({ TPH Q a; (a)::TPH Q = ((v)::TPH O.elementAt Signature: [TPH S, TPH T](0))::TPH U; TPH W b; (b)::TPH W = ((this)::TPH X.id Signature: [TPH Y, TPH Z]((a)::TPH Q))::TPH AA; ((w)::TPH P.addElement Signature: [TPH AC, TPH AD]((b)::TPH W))::TPH AE; return; })::TPH AG TPH AH id(TPH AI x)({ return (x)::TPH AI; })::TPH AJ TestVector()({ super(()); })::TPH AM } Constraints: [(AI < AH), (W < ADA), (ACZ < U), (U < Q), (AH < AA), (AA < W), (Q < AI)] Der Fehler tritt nur auf, wenn der Test alleine ausgeführt wird. Die Varianzen sind: [ACZ, U, Q, AA, W, ADA] [ 1, 1, 1, -1, -1, 1] ADA müsste eigentlich -1 bekommen.
Owner

*** Bug 256 has been marked as a duplicate of this bug. ***

*** Bug 256 has been marked as a duplicate of this bug. ***
Owner

*** Bug 257 has been marked as a duplicate of this bug. ***

*** Bug 257 has been marked as a duplicate of this bug. ***
dholle added the
generics
label 2024-03-04 11:22:52 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: JavaTX/JavaCompilerCore#217
No description provided.