-
Notifications
You must be signed in to change notification settings - Fork 122
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 #1310 from Friendseeker/track-inline-dep
Invalidate sources that depends on `@inline` methods
- Loading branch information
Showing
9 changed files
with
90 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Zinc - The incremental compiler for Scala. | ||
* Copyright Scala Center, Lightbend, and Mark Harrah | ||
* | ||
* Licensed under Apache License 2.0 | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* See the NOTICE file distributed with this work for | ||
* additional information regarding copyright ownership. | ||
*/ | ||
object A { | ||
@inline | ||
def x: Int = 1 | ||
} |
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,21 @@ | ||
/* | ||
* Zinc - The incremental compiler for Scala. | ||
* Copyright Scala Center, Lightbend, and Mark Harrah | ||
* | ||
* Licensed under Apache License 2.0 | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* See the NOTICE file distributed with this work for | ||
* additional information regarding copyright ownership. | ||
*/ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
val exp = args(0).toInt | ||
val res = B.x | ||
if (res != exp) { | ||
val e = new Exception(s"assertion failed: expected $exp, obtained $res") | ||
e.setStackTrace(Array()) | ||
throw e | ||
} | ||
} | ||
} |
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,14 @@ | ||
/* | ||
* Zinc - The incremental compiler for Scala. | ||
* Copyright Scala Center, Lightbend, and Mark Harrah | ||
* | ||
* Licensed under Apache License 2.0 | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* See the NOTICE file distributed with this work for | ||
* additional information regarding copyright ownership. | ||
*/ | ||
|
||
object B { | ||
def x = A.x | ||
} |
15 changes: 15 additions & 0 deletions
15
zinc/src/sbt-test/source-dependencies/inline/changes/A.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,15 @@ | ||
/* | ||
* Zinc - The incremental compiler for Scala. | ||
* Copyright Scala Center, Lightbend, and Mark Harrah | ||
* | ||
* Licensed under Apache License 2.0 | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* See the NOTICE file distributed with this work for | ||
* additional information regarding copyright ownership. | ||
*/ | ||
|
||
object A { | ||
@inline | ||
def x: Int = 2 | ||
} |
12 changes: 12 additions & 0 deletions
12
zinc/src/sbt-test/source-dependencies/inline/incOptions.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,12 @@ | ||
# | ||
# Zinc - The incremental compiler for Scala. | ||
# Copyright Scala Center, Lightbend, and Mark Harrah | ||
# | ||
# Licensed under Apache License 2.0 | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# See the NOTICE file distributed with this work for | ||
# additional information regarding copyright ownership. | ||
# | ||
|
||
scalac.options = -opt:l:inline -opt-inline-from:** |
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,3 @@ | ||
> run 1 | ||
$ copy-file changes/A.scala A.scala | ||
> run 2 |