-
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 #14334 from dotty-staging/fix-scala2-arrayannotarg
Scala2Unpickler: Fix annotation argument handling
- Loading branch information
Showing
5 changed files
with
42 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import kc.Encoder | ||
|
||
def test: Unit = | ||
val cellEncoder = new Encoder[String] { | ||
override def encode: String = "" | ||
} |
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,13 @@ | ||
val scala3Version = sys.props("plugin.scalaVersion") | ||
val scala2Version = sys.props("plugin.scala2Version") | ||
|
||
lazy val lib = project.in(file("lib")) | ||
.settings( | ||
scalaVersion := scala2Version | ||
) | ||
|
||
lazy val app = project.in(file("app")) | ||
.dependsOn(lib) | ||
.settings( | ||
scalaVersion := scala3Version | ||
) |
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 @@ | ||
package kc | ||
|
||
trait Encoder[E] { | ||
def encode: E | ||
|
||
@SuppressWarnings(Array("foo")) | ||
def tag1: Encoder[E] = ??? | ||
|
||
// Make sure we handle empty Array literals too where we can't guess the Array type from its elements | ||
@SuppressWarnings(Array()) | ||
def tag2: Encoder[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 @@ | ||
> app/compile |