Skip to content

Commit daf20d7

Browse files
author
som-snytt
authored
Merge pull request scala#10833 from som-snytt/test/9244
Augment regression test for bugs 9244+11558 [ci: last-only]
2 parents 53f5b2e + 081de87 commit daf20d7

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ scala -cp out Test
127127
```
128128

129129
**Flags**
130-
- To specify compiler flags such as `-Werror -Xlint`, you can add a comment at the top of your source file of the form: `// scalac: -Werror -Xlint`.
130+
- To specify compiler flags such as `-Werror -Xlint`, you can add a comment at the top of your source file of the form:
131+
`//> using options -Werror -Xlint`
131132
- Similarly, a `// javac: <flags>` comment in a Java source file passes flags to the Java compiler.
132133
- A `// filter: <regex>` comment eliminates output lines that match the filter before comparing to the `.check` file.
133134
- A `// java: <flags>` comment makes a `run` test execute in a separate JVM and passes the additional flags to the `java` command.

test/files/pos/t11558.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@ class Test {
33
trait S[T] { def map[R](f: F1[_ >: T, _ <: R]): S[R] }
44
(??? : S[Int]).map(_.toString) // check that map's type param is inferred (should be String)
55
}
6+
7+
object Test_9244 {
8+
trait F1[T1, R] { def apply(a1: T1): R }
9+
10+
def cycle[T](function: F1[? >: T, ? <: T]): Unit = ???
11+
12+
def t9244 = cycle((_: String) => "")
13+
}

0 commit comments

Comments
 (0)