diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/variances.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/pos/variances.scala b/test/files/pos/variances.scala new file mode 100644 index 0000000000..7dc56b0225 --- /dev/null +++ b/test/files/pos/variances.scala @@ -0,0 +1,8 @@ +abstract class P[+a, +b] { // SLS, Example 4.4.2 + def fst: a; + def snd: b +} + +trait Vector[+a] { // SLS, Example 4.4.3 b) + def append[b >: a](x: Vector[b]): Vector[b] +} |