File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ trait C1 [+ A ] {
2
+ def head : A = sys.error(" " )
3
+ }
4
+ trait C2 [@ specialized + A ] extends C1 [A ] {
5
+ override def head : A = super .head
6
+ }
7
+ class C3 extends C2 [Char ]
Original file line number Diff line number Diff line change
1
+ trait Super [@ specialized(Int ) A ] {
2
+ def superb = 0
3
+ }
4
+
5
+ object Sub extends Super [Int ] {
6
+ // it is expected that super[Super].superb crashes, since
7
+ // specialization does parent class rewiring, and the super
8
+ // of Sub becomes Super$mcII$sp and not Super. But I consider
9
+ // this normal behavior -- if you want, I can modify duplicatiors
10
+ // to make this work, but I consider it's best to keep this
11
+ // let the user know Super is not the superclass anymore.
12
+ // super[Super].superb - Vlad
13
+ super .superb // okay
14
+ override def superb : Int = super .superb // okay
15
+ }
You can’t perform that action at this time.
0 commit comments