Skip to content

Commit c4dd93e

Browse files
Duhemmallanrenucci
authored andcommitted
Address review comments
1 parent 5dcc3d3 commit c4dd93e

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -254,24 +254,25 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
254254
def apiClassStructure(csym: ClassSymbol): api.Structure = {
255255
val cinfo = csym.classInfo
256256

257-
val bases =
258-
try {
259-
val ancestorTypes0 = linearizedAncestorTypes(cinfo)
260-
if (ValueClasses.isDerivedValueClass(csym)) {
261-
val underlying = ValueClasses.valueClassUnbox(csym).info.finalResultType
262-
// The underlying type of a value class should be part of the name hash
263-
// of the value class (see the test `value-class-underlying`), this is accomplished
264-
// by adding the underlying type to the list of parent types.
265-
underlying :: ancestorTypes0
266-
} else
267-
ancestorTypes0
268-
} catch {
269-
case ex: CyclicReference =>
270-
// See neg/i1750a for an example where a cyclic error can arise.
271-
// The root cause in this example is an illegal "override" of an inner trait
272-
ctx.error(cyclicErrorMsg(ex), csym.pos)
273-
defn.ObjectType :: Nil
274-
}
257+
val bases = {
258+
val ancestorTypes0 =
259+
try linearizedAncestorTypes(cinfo)
260+
catch {
261+
case ex: CyclicReference =>
262+
// See neg/i1750a for an example where a cyclic error can arise.
263+
// The root cause in this example is an illegal "override" of an inner trait
264+
ctx.error(cyclicErrorMsg(ex), csym.pos)
265+
defn.ObjectType :: Nil
266+
}
267+
if (ValueClasses.isDerivedValueClass(csym)) {
268+
val underlying = ValueClasses.valueClassUnbox(csym).info.finalResultType
269+
// The underlying type of a value class should be part of the name hash
270+
// of the value class (see the test `value-class-underlying`), this is accomplished
271+
// by adding the underlying type to the list of parent types.
272+
underlying :: ancestorTypes0
273+
} else
274+
ancestorTypes0
275+
}
275276

276277
val apiBases = bases.map(apiType)
277278

project/Build.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ object Build {
249249
libraryDependencies ++= {
250250
if (bootstrapFromPublishedJars.value)
251251
Seq(
252-
dottyOrganization % "dotty-library_2.11" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name,
253-
dottyOrganization % "dotty-compiler_2.11" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name
252+
dottyOrganization %% "dotty-library" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name,
253+
dottyOrganization %% "dotty-compiler" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name
254254
).map(_.withDottyCompat(scalaVersion.value))
255255
else
256256
Seq()
@@ -875,7 +875,7 @@ object Build {
875875
unmanagedSourceDirectories in Compile +=
876876
baseDirectory.value / "../language-server/src/dotty/tools/languageserver/config",
877877
sbtPlugin := true,
878-
version := "0.1.6-SNAPSHOT",
878+
version := "0.1.8",
879879
sbtTestDirectory := baseDirectory.value / "sbt-test",
880880
scriptedLaunchOpts += "-Dplugin.version=" + version.value,
881881
scriptedLaunchOpts += "-Dplugin.scalaVersion=" + dottyVersion,

0 commit comments

Comments
 (0)