File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
src/compiler/scala/tools/nsc/transform Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -374,7 +374,9 @@ abstract class UnCurry extends InfoTransform
374
374
assert(toArraySym != NoSymbol )
375
375
def getManifest (tp : Type ): Tree = {
376
376
val manifestOpt = localTyper.findManifest(tp, false )
377
- if (! manifestOpt.tree.isEmpty) manifestOpt.tree
377
+ // Don't want bottom types getting any further than this (SI-4024)
378
+ if (tp.typeSymbol.isBottomClass) getManifest(AnyClass .tpe)
379
+ else if (! manifestOpt.tree.isEmpty) manifestOpt.tree
378
380
else if (tp.bounds.hi ne tp) getManifest(tp.bounds.hi)
379
381
else localTyper.getManifestTree(tree.pos, tp, false )
380
382
}
Original file line number Diff line number Diff line change @@ -5,5 +5,16 @@ object Test extends App {
5
5
val m = x.getClass.getMethod(" toString" )
6
6
7
7
assert(m.invoke(x, (Nil : List [AnyRef ]): _* ) == " abc" )
8
+
9
+ Test2 .main(Array ())
8
10
}
9
11
12
+
13
+ object Test2 {
14
+ def main (args : Array [String ]): Unit = {
15
+ val x = " abc"
16
+ val m = x.getClass.getMethod(" toString" )
17
+ m.invoke(x, Nil : _* )
18
+ m.invoke(x, Seq (): _* )
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments