@@ -207,7 +207,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
207
207
208
208
val selfType = apiType(sym.givenSelfType)
209
209
210
- val name = sym.fullName.stripModuleClassSuffix.mangledString
210
+ val name = sym.fullName.toString
211
211
212
212
val tparams = sym.typeParams.map(apiTypeParameter).toArray
213
213
@@ -241,7 +241,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
241
241
242
242
val javaPlatform = ctx.platform.asInstanceOf [JavaPlatform ]
243
243
if (sym.isStatic && defType == DefinitionType .Module && javaPlatform.hasJavaMainMethod(sym)) {
244
- _mainClasses += name
244
+ _mainClasses += sym.fullName.stripModuleClassSuffix.toString // required for sbt to find the static main method
245
245
}
246
246
247
247
api.ClassLikeDef .of(name, acc, modifiers, anns, tparams, defType)
@@ -316,7 +316,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
316
316
if (aIsClass == bIsClass) {
317
317
if (aIsClass) {
318
318
if (a.is(Module ) == b.is(Module ))
319
- a.fullName.mangledString .compareTo(b.fullName.mangledString )
319
+ a.fullName.toString .compareTo(b.fullName.toString )
320
320
else if (a.is(Module ))
321
321
- 1
322
322
else
@@ -340,10 +340,10 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
340
340
} else if (sym.isType) {
341
341
apiTypeMember(sym.asType)
342
342
} else if (sym.is(Mutable , butNot = Accessor )) {
343
- api.Var .of(sym.name.mangledString , apiAccess(sym), apiModifiers(sym),
343
+ api.Var .of(sym.name.toString , apiAccess(sym), apiModifiers(sym),
344
344
apiAnnotations(sym).toArray, apiType(sym.info))
345
345
} else if (sym.isStable) {
346
- api.Val .of(sym.name.mangledString , apiAccess(sym), apiModifiers(sym),
346
+ api.Val .of(sym.name.toString , apiAccess(sym), apiModifiers(sym),
347
347
apiAnnotations(sym).toArray, apiType(sym.info))
348
348
} else {
349
349
apiDef(sym.asTerm)
@@ -370,7 +370,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
370
370
} else
371
371
(0 until pnames.length).map(Function .const(false ))
372
372
val params = (pnames, ptypes, defaults).zipped.map((pname, ptype, isDefault) =>
373
- api.MethodParameter .of(pname.mangledString , apiType(ptype),
373
+ api.MethodParameter .of(pname.toString , apiType(ptype),
374
374
isDefault, api.ParameterModifier .Plain ))
375
375
api.ParameterList .of(params.toArray, mt.isImplicitMethod) :: paramLists(restpe, params.length)
376
376
case _ =>
@@ -380,20 +380,20 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
380
380
val tparams = sym.info match {
381
381
case pt : TypeLambda =>
382
382
(pt.paramNames, pt.paramInfos).zipped.map((pname, pbounds) =>
383
- apiTypeParameter(pname.mangledString , 0 , pbounds.lo, pbounds.hi))
383
+ apiTypeParameter(pname.toString , 0 , pbounds.lo, pbounds.hi))
384
384
case _ =>
385
385
Nil
386
386
}
387
387
val vparamss = paramLists(sym.info)
388
388
val retTp = sym.info.finalResultType.widenExpr
389
389
390
- api.Def .of(sym.name.mangledString , apiAccess(sym), apiModifiers(sym),
390
+ api.Def .of(sym.name.toString , apiAccess(sym), apiModifiers(sym),
391
391
apiAnnotations(sym).toArray, tparams.toArray, vparamss.toArray, apiType(retTp))
392
392
}
393
393
394
394
def apiTypeMember (sym : TypeSymbol ): api.TypeMember = {
395
395
val typeParams = Array [api.TypeParameter ]()
396
- val name = sym.name.mangledString
396
+ val name = sym.name.toString
397
397
val access = apiAccess(sym)
398
398
val modifiers = apiModifiers(sym)
399
399
val as = apiAnnotations(sym)
@@ -439,7 +439,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
439
439
sym.owner.thisType
440
440
else
441
441
tp.prefix
442
- api.Projection .of(apiType(prefix), sym.name.mangledString )
442
+ api.Projection .of(apiType(prefix), sym.name.toString )
443
443
case AppliedType (tycon, args) =>
444
444
def processArg (arg : Type ): api.Type = arg match {
445
445
case arg @ TypeBounds (lo, hi) => // Handle wildcard parameters
@@ -463,7 +463,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
463
463
val apiRes = apiType(tl.resType)
464
464
api.Polymorphic .of(apiRes, apiTparams.toArray)
465
465
case rt : RefinedType =>
466
- val name = rt.refinedName.mangledString
466
+ val name = rt.refinedName.toString
467
467
val parent = apiType(rt.parent)
468
468
469
469
def typeRefinement (name : String , tp : TypeBounds ): api.TypeMember = tp match {
@@ -536,7 +536,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
536
536
case tp : ParamRef =>
537
537
// TODO: Distinguishing parameters based on their names alone is not enough,
538
538
// the binder is also needed (at least for type lambdas).
539
- api.ParameterRef .of(tp.paramName.mangledString )
539
+ api.ParameterRef .of(tp.paramName.toString )
540
540
case tp : LazyRef =>
541
541
apiType(tp.ref)
542
542
case tp : TypeVar =>
@@ -557,12 +557,12 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
557
557
558
558
def apiThis (sym : Symbol ): api.Singleton = {
559
559
val pathComponents = sym.ownersIterator.takeWhile(! _.isEffectiveRoot)
560
- .map(s => api.Id .of(s.name.mangledString ))
560
+ .map(s => api.Id .of(s.name.toString ))
561
561
api.Singleton .of(api.Path .of(pathComponents.toArray.reverse ++ Array (Constants .thisPath)))
562
562
}
563
563
564
564
def apiTypeParameter (tparam : ParamInfo ): api.TypeParameter =
565
- apiTypeParameter(tparam.paramName.mangledString , tparam.paramVariance,
565
+ apiTypeParameter(tparam.paramName.toString , tparam.paramVariance,
566
566
tparam.paramInfo.bounds.lo, tparam.paramInfo.bounds.hi)
567
567
568
568
def apiTypeParameter (name : String , variance : Int , lo : Type , hi : Type ): api.TypeParameter =
@@ -590,7 +590,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
590
590
if (sym.privateWithin eq NoSymbol )
591
591
Constants .unqualified
592
592
else
593
- api.IdQualifier .of(sym.privateWithin.fullName.mangledString )
593
+ api.IdQualifier .of(sym.privateWithin.fullName.toString )
594
594
if (sym.is(Protected ))
595
595
api.Protected .of(qualifier)
596
596
else
0 commit comments