File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -626,11 +626,13 @@ object Inferencing {
626
626
case tp : RecType => tp.derivedRecType(captureWildcards(tp.parent))
627
627
case tp : LazyRef => captureWildcards(tp.ref)
628
628
case tp : AnnotatedType => tp.derivedAnnotatedType(captureWildcards(tp.parent), tp.annot)
629
+ case tp : FlexibleType => tp.derivedFlexibleType(captureWildcards(tp.hi))
629
630
case _ => tp
630
631
}
631
632
632
633
def hasCaptureConversionArg (tp : Type )(using Context ): Boolean = tp match
633
634
case tp : AppliedType => tp.args.exists(_.typeSymbol == defn.TypeBox_CAP )
635
+ case tp : FlexibleType => hasCaptureConversionArg(tp.hi)
634
636
case _ => false
635
637
}
636
638
Original file line number Diff line number Diff line change
1
+ import java .util .stream ._
2
+
3
+ def test =
4
+ val seqStream : Stream [String ] = ???
5
+ val shouldNotNPE = seqStream.collect(Collectors .toList())
6
+ val shouldNotNPE2 = seqStream.collect(Collectors .toList[String ]())
You can’t perform that action at this time.
0 commit comments