-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force the type of an annotation's typeSymbol beofre checking isStatic
Before 2.13, `isStatic` is implemented by `isNonBottomSubClass(StaticAnnotationClass)` which forces the annotation symbol's type. In 2.13, Java annotations are identified by flags. This check doesn't force the info, and the flags are missing if the info is still a `ClassfileLoader`. This leads to spurious API changes (annotation goes missing) if the depending if the info is already forced or not. A fix for this will be in 2.13.7, but we should still work around it in Zinc to make sure zinc works correctly on 2.13.0-6.
- Loading branch information
Showing
6 changed files
with
30 additions
and
3 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
8 changes: 8 additions & 0 deletions
8
zinc/src/sbt-test/source-dependencies/trait-local-change/build.json
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,8 @@ | ||
{ | ||
"projects": [ | ||
{ | ||
"name": "pro", | ||
"scalaVersion": "2.13.6" | ||
} | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
zinc/src/sbt-test/source-dependencies/trait-local-change/changes/A2.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,3 @@ | ||
trait A { | ||
def f: String = "b" | ||
} |
3 changes: 3 additions & 0 deletions
3
zinc/src/sbt-test/source-dependencies/trait-local-change/pro/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,3 @@ | ||
trait A { | ||
def f: String = "a" | ||
} |
1 change: 1 addition & 0 deletions
1
zinc/src/sbt-test/source-dependencies/trait-local-change/pro/B.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 @@ | ||
class B extends A |
7 changes: 7 additions & 0 deletions
7
zinc/src/sbt-test/source-dependencies/trait-local-change/test
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 @@ | ||
> pro/clean | ||
> pro/compile | ||
$ copy-file changes/A2.scala pro/A.scala | ||
# Second compilation round, there should be no third round (we don't need to recompile B.scala) | ||
> pro/compile | ||
# Check that there were only two rounds of compilation | ||
> pro/checkIterations 2 |