-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14050 from dotty-staging/fix-13994-initial
fix #13994: initialise inline ctx in lateEnter
- Loading branch information
Showing
10 changed files
with
118 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Readme | ||
|
||
Do not use this directory for testing sbt projects in general, add a test case to `dotty/sbt-test` | ||
|
||
This directory is for sbt tests that can not be reproduced with sbt scripted tests. | ||
|
||
Adding a test here will reduce the performance of running all tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import java.util.Properties | ||
|
||
val prepareSources = taskKey[Unit]("Copy changes to the src directory") | ||
val copyChanges = taskKey[Unit]("Copy changes to the src directory") | ||
|
||
val srcDir = settingKey[File]("The directory to copy changes to") | ||
val changesDir = settingKey[File]("The directory to copy changes from") | ||
|
||
srcDir := (ThisBuild / baseDirectory).value / "src" / "main" / "scala" | ||
changesDir := (ThisBuild / baseDirectory).value / "changes" | ||
|
||
prepareSources := IO.copyFile(changesDir.value / "zz.original.scala", srcDir.value / "a" / "zz.scala") | ||
copyChanges := IO.copyFile(changesDir.value / "zz.new.scala", srcDir.value / "a" / "zz.scala") | ||
|
||
(Compile / scalacOptions) ++= Seq( | ||
"-sourcepath", (Compile / sourceDirectories).value.map(_.getAbsolutePath).distinct.mkString(java.io.File.pathSeparator), | ||
) |
7 changes: 7 additions & 0 deletions
7
tests/cmdTest-sbt-tests/sourcepath-with-inline/changes/zz.new.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package a | ||
|
||
object Foo: // note that `Foo` is defined in `zz.scala` | ||
class Local | ||
inline def foo(using Local): Nothing = | ||
??? | ||
??? |
6 changes: 6 additions & 0 deletions
6
tests/cmdTest-sbt-tests/sourcepath-with-inline/changes/zz.original.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package a | ||
|
||
object Foo: // note that `Foo` is defined in `zz.scala` | ||
class Local | ||
inline def foo(using Local): Nothing = | ||
??? |
1 change: 1 addition & 0 deletions
1
tests/cmdTest-sbt-tests/sourcepath-with-inline/project/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.5.5 |
5 changes: 5 additions & 0 deletions
5
tests/cmdTest-sbt-tests/sourcepath-with-inline/src/main/scala/a/Bar.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package a | ||
|
||
object Bar: | ||
given Foo.Local() | ||
def Bar = Foo.foo |