Skip to content

Commit

Permalink
Allow usage of empty package
Browse files Browse the repository at this point in the history
Related to scalameta/metals#2363

This simplifies worksheets for users, since they can define separate classes in files and use in workspaces.
  • Loading branch information
tgodzik committed May 20, 2021
1 parent bf2b863 commit 7960492
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class MarkdownCompiler(
settings.unchecked.value = true // enable detailed unchecked warnings
settings.outputDirs.setSingleOutput(target)
settings.classpath.value = classpath
settings.exposeEmptyPackage.value = true
// enable -Ydelambdafy:inline to avoid future timeouts, see:
// https://github.com/scala/bug/issues/9824
// https://github.com/scalameta/mdoc/issues/124
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/scala/mdoc/document/Binder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final class Binder[T](val value: T, val name: String, val tpe: TPrint[T], val po
s"""Binder($valueString, "$name", "$tpeString")"""
}

def tpeString = Printing.typeString(tpe)
def tpeString = Printing.typeString(tpe).stripPrefix("<empty>.")
}
object Binder {
def generate[A](e: SourceStatement[A], pos: RangePosition)(implicit
Expand Down

0 comments on commit 7960492

Please sign in to comment.