File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -5984,7 +5984,7 @@ object Types {
59845984 */
59855985 def expandParam (tp : NamedType , pre : Type ): Type =
59865986 tp.argForParam(pre) match {
5987- case arg @ TypeRef (pre, _) if pre.isArgPrefixOf(arg.symbol) =>
5987+ case arg @ TypeRef (` pre` , _) if pre.isArgPrefixOf(arg.symbol) =>
59885988 arg.info match {
59895989 case argInfo : TypeBounds => expandBounds(argInfo)
59905990 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