File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
compiler/src/dotty/tools/dotc/core
tests/pos-custom-args/captures Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,11 @@ object Annotations {
7272 def refersToParamOf (tl : TermLambda )(using Context ): Boolean =
7373 val args = arguments
7474 if args.isEmpty then false
75- else tree.existsSubTree {
76- case id : Ident => id.tpe.stripped match
75+ else tree.existsSubTree:
76+ case id : ( Ident | This ) => id.tpe.stripped match
7777 case TermParamRef (tl1, _) => tl eq tl1
7878 case _ => false
7979 case _ => false
80- }
8180
8281 /** A string representation of the annotation. Overridden in BodyAnnotation.
8382 */
Original file line number Diff line number Diff line change 1+ import language .experimental .captureChecking
2+
3+ trait Iterable [T ] { self : Iterable [T ]^ =>
4+ def map [U ](f : T => U ): Iterable [U ]^ {this , f}
5+ }
6+
7+ object Test {
8+ def indentLines (level : Int , lines : Iterable [String ]) =
9+ lines.map(line => line.split(" \n " ).map(" " + _).mkString(" \n " ))
10+
11+ def indentErrorMessages (messages : Iterable [String ]) =
12+ indentLines(1 , messages)
13+ }
You can’t perform that action at this time.
0 commit comments