JavaCompilerCore/examples/luar/WCTest5.jav

71 lines
2.8 KiB
Plaintext
Raw Normal View History

/* Menge<b> Menge<? extends Menge<a>> */
2013-10-18 11:33:46 +00:00
/* Erg:
[[(TPH a = Menge< Integer >), (TPH b = ? extends Matrix)],
[(TPH a = ? extends Menge< Integer >), (TPH b = ? extends Matrix)],
[(TPH a = ? extends Menge< ? extends Integer >), (TPH b = ? extends Matrix)],
[(TPH a = ? extends Menge< ? extends Number >), (TPH b = ? extends Matrix)],
[(TPH a = ? extends Menge< ? extends Object >), (TPH b = ? extends Matrix)],
[(TPH a = ? extends Menge< ? super Integer >), (TPH b = ? extends Matrix)],
2013-10-18 11:33:46 +00:00
[(TPH a = ? extends Object), (TPH b = ? extends Matrix)],
[(TPH a = ? super Menge< Integer >), (TPH b = ? extends Matrix)],
[(TPH a = Menge< Integer >), (TPH b = Matrix)],
[(TPH a = ? extends Menge< Integer >), (TPH b = Matrix)],
[(TPH a = ? extends Menge< ? extends Integer >), (TPH b = Matrix)],
[(TPH a = ? extends Menge< ? extends Number >), (TPH b = Matrix)],
[(TPH a = ? extends Menge< ? extends Object >), (TPH b = Matrix)],
[(TPH a = ? extends Menge< ? super Integer >), (TPH b = Matrix)],
2013-10-18 11:33:46 +00:00
[(TPH a = ? extends Object), (TPH b = Matrix)],
[(TPH a = ? super Menge< Integer >), (TPH b = Matrix)],
[(TPH b = ? extends Menge< TPH a >)],
[(TPH b = Menge< TPH a >)]]
2013-10-18 11:33:46 +00:00
*/
/* FUNKTIONIERT !!! */
/* Fehler bei b <? ? ext Vec<a>:
Reflexivitaet fehlt: b = Vec<a> bzw. b = ? ext Vec<a> wird nicht berechnet
isRXSimilarRY ist wahrscheinlich die falsche Methode, hier wird geprueft,
ob RY instance von RFC ist. Das ist bei RY = Vec<a> und RFC = Vec<Vec<Int>>
nicht der Fall. Moeglicherweise statt isRXSimilarRY match benutzen ???
PL 07-07-04: isRXSimilarRY scheint jetzt zu funktionieren.
Reflexivitaet fehlt noch
*/
/* Fehler behoben. Korrekt? */
/* Menge<? super Menge<a>> Menge<b> */
2013-10-18 11:33:46 +00:00
/* FUNKTIONIERT !!! nochmals ueberpruefen 07-07-29 */
/* Menge<b> Menge<? super Menge<a>> */
2013-10-18 11:33:46 +00:00
/* Test der 3. Menge. FUNKTIONIERT !!! nochmals ueberpruefen 07-07-29 */
/* Menge<a> Menge<Integer> */
2013-10-18 11:33:46 +00:00
/* Test der 4. Menge. FUNKTIONIERT !!! nochmals ueberpruefen 07-07-29 */
Menge<a> Menge<? extends Menge<? extends Menge<b>>>
2013-10-18 11:33:46 +00:00
/* funktioniert. Ergebnis:
[[(TPH b = Integer), (TPH a = ? extends Matrix)],
[(TPH b = Integer), (TPH a = Matrix)],
[(TPH b = ? extends Integer), (TPH a = ? extends Matrix)],
[(TPH b = ? extends Integer), (TPH a = Matrix)],
[(TPH b = ? extends Number), (TPH a = ? extends Matrix)],
[(TPH b = ? extends Number), (TPH a = Matrix)],
[(TPH b = ? extends Object), (TPH a = ? extends Matrix)],
[(TPH b = ? extends Object), (TPH a = Matrix)],
[(TPH b = ? super Integer), (TPH a = ? extends Matrix)],
[(TPH b = ? super Integer), (TPH a = Matrix)],
[(TPH a = ? extends Menge< ? extends Menge< TPH b > >)],
[(TPH a = Menge< ? extends Menge< TPH b > >)],
[(TPH a = ? extends Menge< Menge< TPH b > >)],
[(TPH a = Menge< Menge< TPH b > >)]] */
2013-10-18 11:33:46 +00:00
class Number {}
class Integer extends Number {}
class Menge<a> { }
2013-10-18 11:33:46 +00:00
class Matrix extends Menge<Menge<Integer>> { }