File tree 3 files changed +24
-1
lines changed
compiler/src/dotty/tools/dotc/core
3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -5984,7 +5984,7 @@ object Types {
5984
5984
*/
5985
5985
def expandParam (tp : NamedType , pre : Type ): Type =
5986
5986
tp.argForParam(pre) match {
5987
- case arg @ TypeRef (pre, _) if pre.isArgPrefixOf(arg.symbol) =>
5987
+ case arg @ TypeRef (` pre` , _) if pre.isArgPrefixOf(arg.symbol) =>
5988
5988
arg.info match {
5989
5989
case argInfo : TypeBounds => expandBounds(argInfo)
5990
5990
case argInfo => useAlternate(arg)
Original file line number Diff line number Diff line change
1
+ import javax .annotation .processing .{ AbstractProcessor , RoundEnvironment }
2
+ import javax .lang .model .element .{ ElementKind , PackageElement , TypeElement }
3
+
4
+ import java .util as ju
5
+
6
+ class P extends AbstractProcessor {
7
+ override def process (annotations : ju.Set [? <: TypeElement ], roundEnv : RoundEnvironment ): Boolean = {
8
+ annotations
9
+ .stream()
10
+ .flatMap(annotation => roundEnv.getElementsAnnotatedWith(annotation).stream())
11
+ .filter(element => element.getKind == ElementKind .PACKAGE )
12
+ .map(element => element.asInstanceOf [PackageElement ])
13
+ .toList()
14
+ true
15
+ }
16
+ }
Original file line number Diff line number Diff line change
1
+ class Foo ; class Bar
2
+ class Test :
3
+ def t1 (xs : java.util.stream.Stream [? <: Foo ]) =
4
+ xs.map(x => take(x))
5
+
6
+ def take (x : Foo ) = " "
7
+ def take (x : Bar ) = " "
You can’t perform that action at this time.
0 commit comments