File tree 3 files changed +23
-1
lines changed
compiler/src/dotty/tools/dotc/core
3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -6276,7 +6276,7 @@ object Types extends TypeUtils {
6276
6276
*/
6277
6277
def expandParam (tp : NamedType , pre : Type ): Type =
6278
6278
tp.argForParam(pre) match {
6279
- case arg @ TypeRef (pre, _) if pre.isArgPrefixOf(arg.symbol) =>
6279
+ case arg @ TypeRef (` pre` , _) if pre.isArgPrefixOf(arg.symbol) =>
6280
6280
arg.info match {
6281
6281
case argInfo : TypeBounds => expandBounds(argInfo)
6282
6282
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
+ true
14
+ }
15
+ }
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