We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfd085d commit aeac2f6Copy full SHA for aeac2f6
tests/run/i8425.check
@@ -0,0 +1,3 @@
1
+text: 22
2
+text: 65
3
+text: 10
tests/run/i8425.scala
@@ -0,0 +1,15 @@
+import java.io.{ OutputStream, PrintStream }
+
+trait T {
4
+ val text: String
5
+ val stream = new PrintStream(new OutputStream {
6
+ def write(b: Int) = Console.println(s"text: $b")
7
+ }) {
8
+ override def println(x: Any) = ???
9
+ }
10
+}
11
12
+@main def Test =
13
+ val t = new T { val text = "hello" }
14
+ t.stream.write(22)
15
+ t.stream.println('A')
0 commit comments