File tree 3 files changed +31
-14
lines changed
compiler/test/dotty/tools/dotc
library/src/scala/tasty/util 3 files changed +31
-14
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,6 @@ class FromTastyTests extends ParallelTesting {
193
193
" i2300" ,
194
194
" i2378" ,
195
195
" i239-packageObj" ,
196
- " i2390" ,
197
196
" i2397" ,
198
197
" i2468" ,
199
198
" i2554" ,
@@ -313,9 +312,6 @@ class FromTastyTests extends ParallelTesting {
313
312
" sammy_single" ,
314
313
" sams" ,
315
314
" scala-singleton" ,
316
- " scoping1" ,
317
- " scoping3" ,
318
- " selftypes" ,
319
315
" seq-ordering" ,
320
316
" SI-4012-a" ,
321
317
" SI-4012-b" ,
@@ -354,11 +350,11 @@ class FromTastyTests extends ParallelTesting {
354
350
" t1014" ,
355
351
" t1027" ,
356
352
" t1035" ,
353
+ " t1050" ,
357
354
" t1053" ,
358
355
" t1070" ,
359
356
" t1085" ,
360
357
" t1107a" ,
361
- " t1131" ,
362
358
" t1136" ,
363
359
" t1147" ,
364
360
" t116" ,
@@ -401,7 +397,6 @@ class FromTastyTests extends ParallelTesting {
401
397
" t2454" ,
402
398
" t2484" ,
403
399
" t2503" ,
404
- " t2545" ,
405
400
" t2610" ,
406
401
" t2613" ,
407
402
" t2660" ,
@@ -411,8 +406,6 @@ class FromTastyTests extends ParallelTesting {
411
406
" t2712-3" ,
412
407
" t2712-5" ,
413
408
" t2712-7" ,
414
- " t2795-new" ,
415
- " t2795-old" ,
416
409
" t287" ,
417
410
" t2910" ,
418
411
" t2945" ,
@@ -426,14 +419,12 @@ class FromTastyTests extends ParallelTesting {
426
419
" t3274" ,
427
420
" t3312" ,
428
421
" t3343" ,
429
- " t3371" ,
430
422
" t3374" ,
431
423
" t3384" ,
432
424
" t3430" ,
433
425
" t3528" ,
434
426
" t3560" ,
435
427
" t3570" ,
436
- " t360" ,
437
428
" t361" ,
438
429
" t3672" ,
439
430
" t3777" ,
@@ -459,7 +450,6 @@ class FromTastyTests extends ParallelTesting {
459
450
" t4911" ,
460
451
" t5031_2" ,
461
452
" t5033" ,
462
- " t5071" ,
463
453
" t5178" ,
464
454
" t5240" ,
465
455
" t530" ,
@@ -525,8 +515,8 @@ class FromTastyTests extends ParallelTesting {
525
515
" t7694" ,
526
516
" t7753" ,
527
517
" t7785" ,
528
- " t780" ,
529
518
" t7815" ,
519
+ " t7853" ,
530
520
" t7864" ,
531
521
" t789" ,
532
522
" t7902" ,
@@ -569,7 +559,6 @@ class FromTastyTests extends ParallelTesting {
569
559
" typeinferNull" ,
570
560
" unapply" ,
571
561
" unapplyComplex" ,
572
- " unapplyContexts2" ,
573
562
" unapplyGeneric" ,
574
563
" unicode-decode" ,
575
564
" vararg-pattern" ,
Original file line number Diff line number Diff line change @@ -146,14 +146,30 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
146
146
case stat@ Import (_, _) => stat
147
147
case stat@ Term () => stat
148
148
}
149
- if (stats1.nonEmpty) {
149
+
150
+ def printBody (printSelf : Boolean ) = {
150
151
this += " {"
151
152
indented {
153
+ if (printSelf) {
154
+ val Some (ValDef (name, tpt, _)) = self
155
+ indented {
156
+ val name1 = if (name == " _" ) " this" else name
157
+ this += " " += name1 += " : "
158
+ printTypeTree(tpt)
159
+ this += " =>"
160
+ }
161
+ }
152
162
this += lineBreak()
153
163
printTrees(stats1, lineBreak())
154
164
}
155
165
this += lineBreak() += " }"
156
166
}
167
+ self match {
168
+ case Some (ValDef (_, TypeTree .Singleton (_), _)) =>
169
+ if (stats1.nonEmpty) printBody(printSelf = false )
170
+ case Some (ValDef (_, _, _)) => printBody(printSelf = true )
171
+ case _ => if (stats1.nonEmpty) printBody(printSelf = false )
172
+ }
157
173
this
158
174
159
175
case tdef @ TypeDef (name, rhs) =>
Original file line number Diff line number Diff line change
1
+ /** Decompiled from out/posTestFromTasty/pos/selftypes/selftypes.class */
2
+ object selftypes {
3
+ trait A() extends java.lang.Object { self: selftypes.AB =>
4
+ type AA = scala.List[this.BX]
5
+ class AX()
6
+ }
7
+ trait B() extends java.lang.Object { self: selftypes.AB =>
8
+ type BB = B.this.AA
9
+ class BX()
10
+ }
11
+ class AB() extends selftypes.A with selftypes.B
12
+ }
You can’t perform that action at this time.
0 commit comments