Skip to content

Commit af9da94

Browse files
committed
Scala3doc: document stdlib together with Dotty extensions
1 parent 0f0137e commit af9da94

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,12 @@ trait TypeAssigner {
299299
else fntpe.resultType
300300
else
301301
errorType(i"wrong number of arguments at ${ctx.phase.prev} for $fntpe: ${fn.tpe}, expected: ${fntpe.paramInfos.length}, found: ${args.length}", tree.srcPos)
302+
case t if args.isEmpty =>
303+
// NOTE this case was necessary when unpickling code from Tasty that was compiled referencing, say, `def toString()`
304+
// (which gets a MethodType) and which is unpickled with a different version of the same definition seen as
305+
// `def toString` (which gets an ExprType). This is an unusual situation that happened with stdlib+Dotty's extensions to it,
306+
// when stdlib and said extensions were separate projects.
307+
t
302308
case t =>
303309
if (ctx.settings.Ydebug.value) new FatalError("").printStackTrace()
304310
errorType(err.takesNoParamsStr(fn, ""), tree.srcPos)

project/Build.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,6 +1555,7 @@ object Build {
15551555

15561556
generateScala3StdlibDocumentation:= Def.taskDyn {
15571557
val dottyJars: Seq[java.io.File] = Seq(
1558+
(`scala3-library-bootstrapped`/Compile/products).value,
15581559
(`stdlib-bootstrapped`/Compile/products).value,
15591560
).flatten
15601561

0 commit comments

Comments
 (0)