Skip to content

Commit fb19d0b

Browse files
authored
Merge pull request #1481 from dotty-staging/remove-warnings
Remove warnings from compliation of dotty.
2 parents 90c1106 + 94bc07d commit fb19d0b

26 files changed

+371
-6
lines changed

src/dotty/tools/dotc/transform/InterceptedMethods.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import dotty.tools.dotc.ast.{untpd, tpd}
2222
import dotty.tools.dotc.core.Constants.Constant
2323
import dotty.tools.dotc.core.Types.MethodType
2424
import dotty.tools.dotc.core.Names.Name
25-
import dotty.runtime.LazyVals
2625
import scala.collection.mutable.ListBuffer
2726
import dotty.tools.dotc.core.Denotations.SingleDenotation
2827
import dotty.tools.dotc.core.SymDenotations.SymDenotation

src/dotty/tools/dotc/transform/TailRec.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,16 @@ class TailRec extends MiniPhaseTransform with DenotTransformer with FullParamete
338338
assert(false, "We should never have gotten inside a pattern")
339339
tree
340340

341+
case t @ DefDef(_, _, _, _, _) =>
342+
t // todo: could improve to handle DefDef's with a label flag calls to which are in tail position
343+
341344
case ValDef(_, _, _) | EmptyTree | Super(_, _) | This(_) |
342-
Literal(_) | TypeTree(_) | DefDef(_, _, _, _, _) | TypeDef(_, _) =>
345+
Literal(_) | TypeTree(_) | TypeDef(_, _) =>
343346
tree
344347

345348
case Return(expr, from) =>
346349
tpd.cpy.Return(tree)(noTailTransform(expr), from)
347-
case t: DefDef =>
348-
t // todo: could improve to handle DefDef's with a label flag calls to which are in tail position
350+
349351
case _ =>
350352
super.transform(tree)
351353
}

src/scala/compat/java8/JFunction.java

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,96 +11,183 @@ public final class JFunction {
1111
private JFunction() {}
1212
public static <R> scala.Function0<R> func(JFunction0<R> f) { return f; }
1313
public static scala.Function0<BoxedUnit> proc(JProcedure0 p) { return p; }
14+
@SuppressWarnings("unchecked")
1415
public static scala.Function0<BoxedUnit> procSpecialized(JFunction0$mcV$sp f) { return f; }
16+
@SuppressWarnings("unchecked")
1517
public static scala.Function0<Byte> funcSpecialized(JFunction0$mcB$sp f) { return f; }
18+
@SuppressWarnings("unchecked")
1619
public static scala.Function0<Short> funcSpecialized(JFunction0$mcS$sp f) { return f; }
20+
@SuppressWarnings("unchecked")
1721
public static scala.Function0<Integer> funcSpecialized(JFunction0$mcI$sp f) { return f; }
22+
@SuppressWarnings("unchecked")
1823
public static scala.Function0<Long> funcSpecialized(JFunction0$mcJ$sp f) { return f; }
24+
@SuppressWarnings("unchecked")
1925
public static scala.Function0<Character> funcSpecialized(JFunction0$mcC$sp f) { return f; }
26+
@SuppressWarnings("unchecked")
2027
public static scala.Function0<Float> funcSpecialized(JFunction0$mcF$sp f) { return f; }
28+
@SuppressWarnings("unchecked")
2129
public static scala.Function0<Double> funcSpecialized(JFunction0$mcD$sp f) { return f; }
30+
@SuppressWarnings("unchecked")
2231
public static scala.Function0<Boolean> funcSpecialized(JFunction0$mcZ$sp f) { return f; }
2332
public static <T1, R> scala.Function1<T1, R> func(JFunction1<T1, R> f) { return f; }
2433
public static <T1> scala.Function1<T1, BoxedUnit> proc(JProcedure1<T1> p) { return p; }
34+
@SuppressWarnings("unchecked")
2535
public static scala.Function1<Integer, BoxedUnit> procSpecialized(JFunction1$mcVI$sp f) { return f; }
36+
@SuppressWarnings("unchecked")
2637
public static scala.Function1<Integer, Boolean> funcSpecialized(JFunction1$mcZI$sp f) { return f; }
38+
@SuppressWarnings("unchecked")
2739
public static scala.Function1<Integer, Integer> funcSpecialized(JFunction1$mcII$sp f) { return f; }
40+
@SuppressWarnings("unchecked")
2841
public static scala.Function1<Integer, Float> funcSpecialized(JFunction1$mcFI$sp f) { return f; }
42+
@SuppressWarnings("unchecked")
2943
public static scala.Function1<Integer, Long> funcSpecialized(JFunction1$mcJI$sp f) { return f; }
44+
@SuppressWarnings("unchecked")
3045
public static scala.Function1<Integer, Double> funcSpecialized(JFunction1$mcDI$sp f) { return f; }
46+
@SuppressWarnings("unchecked")
3147
public static scala.Function1<Long, BoxedUnit> procSpecialized(JFunction1$mcVJ$sp f) { return f; }
48+
@SuppressWarnings("unchecked")
3249
public static scala.Function1<Long, Boolean> funcSpecialized(JFunction1$mcZJ$sp f) { return f; }
50+
@SuppressWarnings("unchecked")
3351
public static scala.Function1<Long, Integer> funcSpecialized(JFunction1$mcIJ$sp f) { return f; }
52+
@SuppressWarnings("unchecked")
3453
public static scala.Function1<Long, Float> funcSpecialized(JFunction1$mcFJ$sp f) { return f; }
54+
@SuppressWarnings("unchecked")
3555
public static scala.Function1<Long, Long> funcSpecialized(JFunction1$mcJJ$sp f) { return f; }
56+
@SuppressWarnings("unchecked")
3657
public static scala.Function1<Long, Double> funcSpecialized(JFunction1$mcDJ$sp f) { return f; }
58+
@SuppressWarnings("unchecked")
3759
public static scala.Function1<Float, BoxedUnit> procSpecialized(JFunction1$mcVF$sp f) { return f; }
60+
@SuppressWarnings("unchecked")
3861
public static scala.Function1<Float, Boolean> funcSpecialized(JFunction1$mcZF$sp f) { return f; }
62+
@SuppressWarnings("unchecked")
3963
public static scala.Function1<Float, Integer> funcSpecialized(JFunction1$mcIF$sp f) { return f; }
64+
@SuppressWarnings("unchecked")
4065
public static scala.Function1<Float, Float> funcSpecialized(JFunction1$mcFF$sp f) { return f; }
66+
@SuppressWarnings("unchecked")
4167
public static scala.Function1<Float, Long> funcSpecialized(JFunction1$mcJF$sp f) { return f; }
68+
@SuppressWarnings("unchecked")
4269
public static scala.Function1<Float, Double> funcSpecialized(JFunction1$mcDF$sp f) { return f; }
70+
@SuppressWarnings("unchecked")
4371
public static scala.Function1<Double, BoxedUnit> procSpecialized(JFunction1$mcVD$sp f) { return f; }
72+
@SuppressWarnings("unchecked")
4473
public static scala.Function1<Double, Boolean> funcSpecialized(JFunction1$mcZD$sp f) { return f; }
74+
@SuppressWarnings("unchecked")
4575
public static scala.Function1<Double, Integer> funcSpecialized(JFunction1$mcID$sp f) { return f; }
76+
@SuppressWarnings("unchecked")
4677
public static scala.Function1<Double, Float> funcSpecialized(JFunction1$mcFD$sp f) { return f; }
78+
@SuppressWarnings("unchecked")
4779
public static scala.Function1<Double, Long> funcSpecialized(JFunction1$mcJD$sp f) { return f; }
80+
@SuppressWarnings("unchecked")
4881
public static scala.Function1<Double, Double> funcSpecialized(JFunction1$mcDD$sp f) { return f; }
4982
public static <T1, T2, R> scala.Function2<T1, T2, R> func(JFunction2<T1, T2, R> f) { return f; }
5083
public static <T1, T2> scala.Function2<T1, T2, BoxedUnit> proc(JProcedure2<T1, T2> p) { return p; }
84+
@SuppressWarnings("unchecked")
5185
public static scala.Function2<Integer, Integer, BoxedUnit> procSpecialized(JFunction2$mcVII$sp f) { return f; }
86+
@SuppressWarnings("unchecked")
5287
public static scala.Function2<Integer, Integer, Boolean> funcSpecialized(JFunction2$mcZII$sp f) { return f; }
88+
@SuppressWarnings("unchecked")
5389
public static scala.Function2<Integer, Integer, Integer> funcSpecialized(JFunction2$mcIII$sp f) { return f; }
90+
@SuppressWarnings("unchecked")
5491
public static scala.Function2<Integer, Integer, Float> funcSpecialized(JFunction2$mcFII$sp f) { return f; }
92+
@SuppressWarnings("unchecked")
5593
public static scala.Function2<Integer, Integer, Long> funcSpecialized(JFunction2$mcJII$sp f) { return f; }
94+
@SuppressWarnings("unchecked")
5695
public static scala.Function2<Integer, Integer, Double> funcSpecialized(JFunction2$mcDII$sp f) { return f; }
96+
@SuppressWarnings("unchecked")
5797
public static scala.Function2<Integer, Long, BoxedUnit> procSpecialized(JFunction2$mcVIJ$sp f) { return f; }
98+
@SuppressWarnings("unchecked")
5899
public static scala.Function2<Integer, Long, Boolean> funcSpecialized(JFunction2$mcZIJ$sp f) { return f; }
100+
@SuppressWarnings("unchecked")
59101
public static scala.Function2<Integer, Long, Integer> funcSpecialized(JFunction2$mcIIJ$sp f) { return f; }
102+
@SuppressWarnings("unchecked")
60103
public static scala.Function2<Integer, Long, Float> funcSpecialized(JFunction2$mcFIJ$sp f) { return f; }
104+
@SuppressWarnings("unchecked")
61105
public static scala.Function2<Integer, Long, Long> funcSpecialized(JFunction2$mcJIJ$sp f) { return f; }
106+
@SuppressWarnings("unchecked")
62107
public static scala.Function2<Integer, Long, Double> funcSpecialized(JFunction2$mcDIJ$sp f) { return f; }
108+
@SuppressWarnings("unchecked")
63109
public static scala.Function2<Integer, Double, BoxedUnit> procSpecialized(JFunction2$mcVID$sp f) { return f; }
110+
@SuppressWarnings("unchecked")
64111
public static scala.Function2<Integer, Double, Boolean> funcSpecialized(JFunction2$mcZID$sp f) { return f; }
112+
@SuppressWarnings("unchecked")
65113
public static scala.Function2<Integer, Double, Integer> funcSpecialized(JFunction2$mcIID$sp f) { return f; }
114+
@SuppressWarnings("unchecked")
66115
public static scala.Function2<Integer, Double, Float> funcSpecialized(JFunction2$mcFID$sp f) { return f; }
116+
@SuppressWarnings("unchecked")
67117
public static scala.Function2<Integer, Double, Long> funcSpecialized(JFunction2$mcJID$sp f) { return f; }
118+
@SuppressWarnings("unchecked")
68119
public static scala.Function2<Integer, Double, Double> funcSpecialized(JFunction2$mcDID$sp f) { return f; }
120+
@SuppressWarnings("unchecked")
69121
public static scala.Function2<Long, Integer, BoxedUnit> procSpecialized(JFunction2$mcVJI$sp f) { return f; }
122+
@SuppressWarnings("unchecked")
70123
public static scala.Function2<Long, Integer, Boolean> funcSpecialized(JFunction2$mcZJI$sp f) { return f; }
124+
@SuppressWarnings("unchecked")
71125
public static scala.Function2<Long, Integer, Integer> funcSpecialized(JFunction2$mcIJI$sp f) { return f; }
126+
@SuppressWarnings("unchecked")
72127
public static scala.Function2<Long, Integer, Float> funcSpecialized(JFunction2$mcFJI$sp f) { return f; }
128+
@SuppressWarnings("unchecked")
73129
public static scala.Function2<Long, Integer, Long> funcSpecialized(JFunction2$mcJJI$sp f) { return f; }
130+
@SuppressWarnings("unchecked")
74131
public static scala.Function2<Long, Integer, Double> funcSpecialized(JFunction2$mcDJI$sp f) { return f; }
132+
@SuppressWarnings("unchecked")
75133
public static scala.Function2<Long, Long, BoxedUnit> procSpecialized(JFunction2$mcVJJ$sp f) { return f; }
134+
@SuppressWarnings("unchecked")
76135
public static scala.Function2<Long, Long, Boolean> funcSpecialized(JFunction2$mcZJJ$sp f) { return f; }
136+
@SuppressWarnings("unchecked")
77137
public static scala.Function2<Long, Long, Integer> funcSpecialized(JFunction2$mcIJJ$sp f) { return f; }
138+
@SuppressWarnings("unchecked")
78139
public static scala.Function2<Long, Long, Float> funcSpecialized(JFunction2$mcFJJ$sp f) { return f; }
140+
@SuppressWarnings("unchecked")
79141
public static scala.Function2<Long, Long, Long> funcSpecialized(JFunction2$mcJJJ$sp f) { return f; }
142+
@SuppressWarnings("unchecked")
80143
public static scala.Function2<Long, Long, Double> funcSpecialized(JFunction2$mcDJJ$sp f) { return f; }
144+
@SuppressWarnings("unchecked")
81145
public static scala.Function2<Long, Double, BoxedUnit> procSpecialized(JFunction2$mcVJD$sp f) { return f; }
146+
@SuppressWarnings("unchecked")
82147
public static scala.Function2<Long, Double, Boolean> funcSpecialized(JFunction2$mcZJD$sp f) { return f; }
148+
@SuppressWarnings("unchecked")
83149
public static scala.Function2<Long, Double, Integer> funcSpecialized(JFunction2$mcIJD$sp f) { return f; }
150+
@SuppressWarnings("unchecked")
84151
public static scala.Function2<Long, Double, Float> funcSpecialized(JFunction2$mcFJD$sp f) { return f; }
152+
@SuppressWarnings("unchecked")
85153
public static scala.Function2<Long, Double, Long> funcSpecialized(JFunction2$mcJJD$sp f) { return f; }
154+
@SuppressWarnings("unchecked")
86155
public static scala.Function2<Long, Double, Double> funcSpecialized(JFunction2$mcDJD$sp f) { return f; }
156+
@SuppressWarnings("unchecked")
87157
public static scala.Function2<Double, Integer, BoxedUnit> procSpecialized(JFunction2$mcVDI$sp f) { return f; }
158+
@SuppressWarnings("unchecked")
88159
public static scala.Function2<Double, Integer, Boolean> funcSpecialized(JFunction2$mcZDI$sp f) { return f; }
160+
@SuppressWarnings("unchecked")
89161
public static scala.Function2<Double, Integer, Integer> funcSpecialized(JFunction2$mcIDI$sp f) { return f; }
162+
@SuppressWarnings("unchecked")
90163
public static scala.Function2<Double, Integer, Float> funcSpecialized(JFunction2$mcFDI$sp f) { return f; }
164+
@SuppressWarnings("unchecked")
91165
public static scala.Function2<Double, Integer, Long> funcSpecialized(JFunction2$mcJDI$sp f) { return f; }
166+
@SuppressWarnings("unchecked")
92167
public static scala.Function2<Double, Integer, Double> funcSpecialized(JFunction2$mcDDI$sp f) { return f; }
168+
@SuppressWarnings("unchecked")
93169
public static scala.Function2<Double, Long, BoxedUnit> procSpecialized(JFunction2$mcVDJ$sp f) { return f; }
170+
@SuppressWarnings("unchecked")
94171
public static scala.Function2<Double, Long, Boolean> funcSpecialized(JFunction2$mcZDJ$sp f) { return f; }
172+
@SuppressWarnings("unchecked")
95173
public static scala.Function2<Double, Long, Integer> funcSpecialized(JFunction2$mcIDJ$sp f) { return f; }
174+
@SuppressWarnings("unchecked")
96175
public static scala.Function2<Double, Long, Float> funcSpecialized(JFunction2$mcFDJ$sp f) { return f; }
176+
@SuppressWarnings("unchecked")
97177
public static scala.Function2<Double, Long, Long> funcSpecialized(JFunction2$mcJDJ$sp f) { return f; }
178+
@SuppressWarnings("unchecked")
98179
public static scala.Function2<Double, Long, Double> funcSpecialized(JFunction2$mcDDJ$sp f) { return f; }
180+
@SuppressWarnings("unchecked")
99181
public static scala.Function2<Double, Double, BoxedUnit> procSpecialized(JFunction2$mcVDD$sp f) { return f; }
182+
@SuppressWarnings("unchecked")
100183
public static scala.Function2<Double, Double, Boolean> funcSpecialized(JFunction2$mcZDD$sp f) { return f; }
184+
@SuppressWarnings("unchecked")
101185
public static scala.Function2<Double, Double, Integer> funcSpecialized(JFunction2$mcIDD$sp f) { return f; }
186+
@SuppressWarnings("unchecked")
102187
public static scala.Function2<Double, Double, Float> funcSpecialized(JFunction2$mcFDD$sp f) { return f; }
188+
@SuppressWarnings("unchecked")
103189
public static scala.Function2<Double, Double, Long> funcSpecialized(JFunction2$mcJDD$sp f) { return f; }
190+
@SuppressWarnings("unchecked")
104191
public static scala.Function2<Double, Double, Double> funcSpecialized(JFunction2$mcDDD$sp f) { return f; }
105192
public static <T1, T2, T3, R> scala.Function3<T1, T2, T3, R> func(JFunction3<T1, T2, T3, R> f) { return f; }
106193
public static <T1, T2, T3> scala.Function3<T1, T2, T3, BoxedUnit> proc(JProcedure3<T1, T2, T3> p) { return p; }

0 commit comments

Comments
 (0)