Skip to content

Commit 7705124

Browse files
committed
Address review comments
1 parent 80d36d5 commit 7705124

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
@@ -197,8 +197,8 @@ object Build {
197197
libraryDependencies ++= {
198198
if (bootstrapFromPublishedJars.value)
199199
Seq(
200-
dottyOrganization % "dotty-library_2.11" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name,
201-
dottyOrganization % "dotty-compiler_2.11" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name
200+
dottyOrganization %% "dotty-library" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name,
201+
dottyOrganization %% "dotty-compiler" % dottyNonBootstrappedVersion % Configurations.ScalaTool.name
202202
).map(_.withDottyCompat(scalaVersion.value))
203203
else
204204
Seq()
@@ -862,7 +862,7 @@ object Build {
862862
unmanagedSourceDirectories in Compile +=
863863
baseDirectory.value / "../language-server/src/dotty/tools/languageserver/config",
864864
sbtPlugin := true,
865-
version := "0.1.6-SNAPSHOT",
865+
version := "0.1.8",
866866
sbtTestDirectory := baseDirectory.value / "sbt-test",
867867
scriptedLaunchOpts += "-Dplugin.version=" + version.value,
868868
scriptedLaunchOpts += "-Dplugin.scalaVersion=" + dottyVersion,

0 commit comments

Comments
 (0)