change order of experiments
This commit is contained in:
@@ -26,22 +26,22 @@ out_box: OutBox[Cat] = OutBox(Cat())
|
|||||||
|
|
||||||
out_box_si: OutBox[Siamese] = OutBox(Siamese())
|
out_box_si: OutBox[Siamese] = OutBox(Siamese())
|
||||||
|
|
||||||
|
out_box = out_box_si
|
||||||
|
|
||||||
## Incompatible types in assignment
|
## Incompatible types in assignment
|
||||||
## expression has type "OutBox[Cat]"
|
## expression has type "OutBox[Cat]"
|
||||||
# variable has type "OutBox[Siamese]"
|
## variable has type "OutBox[Siamese]"
|
||||||
# out_box_si = out_box
|
# out_box_si = out_box
|
||||||
|
|
||||||
out_box = out_box_si
|
|
||||||
|
|
||||||
################### Contravariance
|
################### Contravariance
|
||||||
|
|
||||||
in_box: InBox[Cat] = InBox()
|
in_box: InBox[Cat] = InBox()
|
||||||
|
|
||||||
in_box_si: InBox[Siamese] = InBox()
|
in_box_si: InBox[Siamese] = InBox()
|
||||||
|
|
||||||
in_box_si = in_box
|
|
||||||
|
|
||||||
## Incompatible types in assignment
|
## Incompatible types in assignment
|
||||||
## expression has type "InBox[Siamese]"
|
## expression has type "InBox[Siamese]"
|
||||||
## variable has type "InBox[Cat]"
|
## variable has type "InBox[Cat]"
|
||||||
# in_box = in_box_si
|
# in_box = in_box_si
|
||||||
|
|
||||||
|
in_box_si = in_box
|
||||||
|
|||||||
Reference in New Issue
Block a user