Closed
Description
After fixing #1544 in #1572, I tried invoking the Test.foo
method from the REPL.
object Test {
def foo(p1: Int, p2: Int, p3: Int, p4: Int, p5: Int, p6: Int, p7: Int, p8: Int, p9: Int, p10: Int, p11: Int, p12: Int, p13: Int, p14: Int, p15: Int, p16: Int, p17: Int, p18: Int, p19: Int, p20: Int, p21: Int, p22: Int, p23: Int, p24: Int, p25: Int, p26: Int, p27: Int, p28: Int, p29: Int, p30: Int, p31: Int, p32: Int, p33: Int, p34: Int, p35: Int, p36: Int, p37: Int, p38: Int, p39: Int, p40: Int, p41: Int, p42: Int, p43: Int, p44: Int, p45: Int, p46: Int, p47: Int, p48: Int, p49: Int, p50: Int, p51: Int, p52: Int, p53: Int, p54: Int, p55: Int, p56: Int, p57: Int, p58: Int, p59: Int, p60: Int, p61: Int, p62: Int, p63: Int, p64: Int, p65: Int, p66: Int, p67: Int, p68: Int, p69: Int, p70: Int, p71: Int, p72: Int, p73: Int, p74: Int, p75: Int, p76: Int, p77: Int, p78: Int, p79: Int, p80: Int, p81: Int, p82: Int, p83: Int, p84: Int, p85: Int, p86: Int, p87: Int, p88: Int, p89: Int, p90: Int, p91: Int, p92: Int, p93: Int, p94: Int, p95: Int, p96: Int, p97: Int, p98: Int, p99: Int, p100: Int, p101: Int, p102: Int, p103: Int, p104: Int, p105: Int, p106: Int, p107: Int, p108: Int, p109: Int): Int = 42
}
However, that produced a crash in the REPL while typechecking the expression I typed:
$ ./bin/dotc Test.scala
$ ./bin/dotr
Starting dotty REPL...
Welcome to Scala.next (pre-alpha) (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_92).
Type in expressions to have them evaluated.
Type :help for more information.
scala>
Test.foo(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109)Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 109
at dotty.tools.dotc.core.Definitions$FunctionOf$.apply(Definitions.scala:551)
at dotty.tools.dotc.typer.ProtoTypes$$anonfun$normalize$1.apply(ProtoTypes.scala:401)
at dotty.tools.dotc.typer.ProtoTypes$$anonfun$normalize$1.apply(ProtoTypes.scala:387)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.ProtoTypes$.normalize(ProtoTypes.scala:386)
at dotty.tools.dotc.typer.ProtoTypes$Compatibility$class.normalizedCompatible(ProtoTypes.scala:43)
at dotty.tools.dotc.typer.Typer.normalizedCompatible(Typer.scala:61)
at dotty.tools.dotc.typer.ProtoTypes$SelectionProto.dotty$tools$dotc$typer$ProtoTypes$SelectionProto$$qualifies$1(ProtoTypes.scala:99)
at dotty.tools.dotc.typer.ProtoTypes$SelectionProto.isMatchedBy(ProtoTypes.scala:101)
at dotty.tools.dotc.core.TypeComparer.isMatchedByProto(TypeComparer.scala:943)
at dotty.tools.dotc.core.TypeComparer.dotty$tools$dotc$core$TypeComparer$$firstTry(TypeComparer.scala:207)
at dotty.tools.dotc.core.TypeComparer$$anonfun$isSubType$1.apply$mcZ$sp(TypeComparer.scala:112)
at dotty.tools.dotc.core.TypeComparer$$anonfun$isSubType$1.apply(TypeComparer.scala:104)
at dotty.tools.dotc.core.TypeComparer$$anonfun$isSubType$1.apply(TypeComparer.scala:104)
at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:154)
at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
at dotty.tools.dotc.core.TypeComparer.isSubType(TypeComparer.scala:103)
at dotty.tools.dotc.core.TypeComparer.topLevelSubType(TypeComparer.scala:97)
at dotty.tools.dotc.core.Types$Type$$anonfun$$less$colon$less$1.apply$mcZ$sp(Types.scala:674)
at dotty.tools.dotc.core.Types$Type$$anonfun$$less$colon$less$1.apply(Types.scala:674)
at dotty.tools.dotc.core.Types$Type$$anonfun$$less$colon$less$1.apply(Types.scala:674)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.core.Types$Type.$less$colon$less(Types.scala:673)
at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:1826)
at dotty.tools.dotc.typer.Typer.adaptInterpolated(Typer.scala:1939)
at dotty.tools.dotc.typer.Typer$$anonfun$adapt$1$$anonfun$apply$28.apply(Typer.scala:1609)
at dotty.tools.dotc.typer.Typer$$anonfun$adapt$1$$anonfun$apply$28.apply(Typer.scala:1605)
at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:154)
at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
at dotty.tools.dotc.typer.Typer$$anonfun$adapt$1.apply(Typer.scala:1605)
at dotty.tools.dotc.typer.Typer$$anonfun$adapt$1.apply(Typer.scala:1605)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:1604)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1492)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1490)
at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:154)
at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1490)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1542)
at dotty.tools.dotc.typer.Typer$$anonfun$typedSelect$1.dotty$tools$dotc$typer$Typer$$anonfun$$typeSelectOnTerm$1(Typer.scala:368)
at dotty.tools.dotc.typer.Typer$$anonfun$typedSelect$1.apply(Typer.scala:402)
at dotty.tools.dotc.typer.Typer$$anonfun$typedSelect$1.apply(Typer.scala:366)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Typer.typedSelect(Typer.scala:366)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1422)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1480)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1492)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1490)
at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:154)
at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1490)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1542)
at dotty.tools.dotc.typer.Applications$$anonfun$realApply$1$1.apply(Applications.scala:546)
at dotty.tools.dotc.typer.Applications$$anonfun$realApply$1$1.apply(Applications.scala:544)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Applications$class.realApply$1(Applications.scala:544)
at dotty.tools.dotc.typer.Applications$class.typedApply(Applications.scala:641)
at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:61)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1441)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1482)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1492)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1490)
at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:154)
at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1490)
at dotty.tools.dotc.typer.Namer.typedAheadImpl(Namer.scala:778)
at dotty.tools.dotc.typer.Namer.typedAheadExpr(Namer.scala:788)
at dotty.tools.dotc.typer.Namer.rhsType$1(Namer.scala:909)
at dotty.tools.dotc.typer.Namer.cookedRhsType$1(Namer.scala:910)
at dotty.tools.dotc.typer.Namer.lhsType$lzycompute$1(Namer.scala:911)
at dotty.tools.dotc.typer.Namer.lhsType$1(Namer.scala:911)
at dotty.tools.dotc.typer.Namer.inferredType$1(Namer.scala:923)
at dotty.tools.dotc.typer.Namer.valOrDefDefSig(Namer.scala:931)
at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:535)
at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:602)
at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:561)
at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:210)
at dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:188)
at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:327)
at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:1394)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1419)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1480)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1492)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1490)
at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:154)
at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1490)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1514)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1530)
at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1248)
at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1196)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:1196)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1432)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1480)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1492)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1490)
at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:154)
at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1490)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1514)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1530)
at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1248)
at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1196)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:1196)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1432)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1480)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1492)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1490)
at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:154)
at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1490)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1514)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1530)
at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1248)
at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:1196)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:1196)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1432)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1480)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1492)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1490)
at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:154)
at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1490)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1514)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1530)
at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:1348)
at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:1339)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:1339)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1470)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1482)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1492)
at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1490)
at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:154)
at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:57)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1490)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1542)
at dotty.tools.dotc.typer.FrontEnd$$anonfun$typeCheck$1.apply$mcV$sp(FrontEnd.scala:50)
at dotty.tools.dotc.typer.FrontEnd.monitor(FrontEnd.scala:24)
at dotty.tools.dotc.typer.FrontEnd.typeCheck(FrontEnd.scala:48)
at dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:72)
at dotty.tools.dotc.typer.FrontEnd$$anonfun$runOn$3.apply(FrontEnd.scala:72)
at scala.collection.immutable.List.foreach(List.scala:381)
at dotty.tools.dotc.typer.FrontEnd.runOn(FrontEnd.scala:72)
at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:71)
at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:68)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply$mcV$sp(Run.scala:68)
at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:62)
at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:62)
at dotty.tools.dotc.util.Stats$.monitorHeartBeat(Stats.scala:76)
at dotty.tools.dotc.Run.compileUnits(Run.scala:62)
at dotty.tools.dotc.Run.compileSources(Run.scala:59)
at dotty.tools.dotc.repl.CompilingInterpreter.compileSources(CompilingInterpreter.scala:195)
at dotty.tools.dotc.repl.CompilingInterpreter$Request.compile(CompilingInterpreter.scala:398)
at dotty.tools.dotc.repl.CompilingInterpreter.interpret(CompilingInterpreter.scala:218)
at dotty.tools.dotc.repl.CompilingInterpreter.interpret(CompilingInterpreter.scala:215)
at dotty.tools.dotc.repl.AmmoniteReader$$anonfun$2.apply(AmmoniteReader.scala:19)
at dotty.tools.dotc.repl.AmmoniteReader$$anonfun$2.apply(AmmoniteReader.scala:19)
at dotty.tools.dotc.repl.CompilingInterpreter.delayOutputDuring(CompilingInterpreter.scala:103)
at dotty.tools.dotc.repl.AmmoniteReader.incompleteInput(AmmoniteReader.scala:19)
at dotty.tools.dotc.repl.AmmoniteReader$$anonfun$1.applyOrElse(AmmoniteReader.scala:31)
at dotty.tools.dotc.repl.AmmoniteReader$$anonfun$1.applyOrElse(AmmoniteReader.scala:29)
at scala.PartialFunction$Lifted.apply(PartialFunction.scala:223)
at scala.PartialFunction$Lifted.apply(PartialFunction.scala:219)
at dotty.tools.dotc.repl.ammonite.terminal.Filter$$anon$1$$anonfun$1$$anonfun$apply$1.apply(Filter.scala:21)
at dotty.tools.dotc.repl.ammonite.terminal.Filter$$anon$1$$anonfun$1$$anonfun$apply$1.apply(Filter.scala:21)
at scala.collection.Iterator$$anon$11.next(Iterator.scala:370)
at scala.collection.Iterator$class.find(Iterator.scala:802)
at scala.collection.AbstractIterator.find(Iterator.scala:1202)
at dotty.tools.dotc.repl.ammonite.terminal.Filter$$anon$1$$anonfun$1.apply(Filter.scala:21)
at dotty.tools.dotc.repl.ammonite.terminal.Filter$$anon$1$$anonfun$1.apply(Filter.scala:21)
at dotty.tools.dotc.repl.ammonite.terminal.Terminal$.readChar$1(Terminal.scala:267)
at dotty.tools.dotc.repl.ammonite.terminal.Terminal$.readLine(Terminal.scala:299)
at dotty.tools.dotc.repl.AmmoniteReader.readLine(AmmoniteReader.scala:54)
at dotty.tools.dotc.repl.InterpreterLoop.run(InterpreterLoop.scala:210)
at dotty.tools.dotc.repl.REPL.doCompile(REPL.scala:43)
at dotty.tools.dotc.Driver.process(Driver.scala:124)
at dotty.tools.dotc.Driver.process(Driver.scala:93)
at dotty.tools.dotc.Driver.process(Driver.scala:105)
at dotty.tools.dotc.Driver.main(Driver.scala:132)
at dotty.tools.dotc.repl.Main.main(Main.scala)
$
Metadata
Metadata
Assignees
Labels
No labels