forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix expandParam's use of argForParam/isArgPrefixOf.
- Loading branch information
Showing
3 changed files
with
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import javax.annotation.processing.{ AbstractProcessor, RoundEnvironment } | ||
import javax.lang.model.element.{ ElementKind, PackageElement, TypeElement } | ||
|
||
import java.util as ju | ||
|
||
class P extends AbstractProcessor { | ||
override def process(annotations: ju.Set[? <: TypeElement], roundEnv: RoundEnvironment): Boolean = { | ||
annotations | ||
.stream() | ||
.flatMap(annotation => roundEnv.getElementsAnnotatedWith(annotation).stream()) | ||
.filter(element => element.getKind == ElementKind.PACKAGE) | ||
.map(element => element.asInstanceOf[PackageElement]) | ||
.toList() | ||
true | ||
} | ||
} |
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 @@ | ||
class Foo; class Bar | ||
class Test: | ||
def t1(xs: java.util.stream.Stream[? <: Foo]) = | ||
xs.map(x => take(x)) | ||
|
||
def take(x: Foo) = "" | ||
def take(x: Bar) = "" |