File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
scalactic.dotty/src/main/scala/org/scalactic/source Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ trait DottyBuild { this: BuildCommons =>
28
28
.settings(
29
29
projectTitle := " Scalactic" ,
30
30
organization := " com.sandinh" ,
31
+ version := " 3.1.1-dottybug8581" ,
31
32
moduleName := " scalactic" ,
32
33
initialCommands in console := " import org.scalactic._" ,
33
34
sourceGenerators in Compile += {
Original file line number Diff line number Diff line change @@ -69,10 +69,12 @@ object Position {
69
69
private def genPosition (implicit qctx : QuoteContext ): Expr [Position ] = {
70
70
import qctx .tasty ._
71
71
72
- val file = rootPosition.sourceFile
72
+ val rootPos = rootPosition
73
+ val file = rootPos.sourceFile
73
74
val fileName : String = file.jpath.getFileName.toString
74
75
val filePath : String = if (showScalacticFillFilePathnames) file.toString else Resources .pleaseDefineScalacticFillFilePathnameEnvVar
75
- val lineNo : Int = rootPosition.startLine
76
+ // https://github.com/lampepfl/dotty/issues/8581
77
+ val lineNo : Int = if (rootPos.exists) rootPos.startLine else - 1
76
78
' { Position ($ {Expr (fileName)}, $ {Expr (filePath)}, $ {Expr (lineNo)}) }
77
79
}
78
80
You can’t perform that action at this time.
0 commit comments