Skip to content

Commit f37debd

Browse files
committed
Fix typos, remove duplicated test
1 parent a39e5b2 commit f37debd

File tree

3 files changed

+9
-20
lines changed

3 files changed

+9
-20
lines changed

tests/pos-custom-args/qualified-types/syntax_unnamed.scala

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/printing/qualified-types.check

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ package example {
4343
val x4: Int @qualified[Int]((x: Int) => x > 0) = 1
4444
val x5: Int @qualified[Int]((x5: Int) => x > 0) = 1
4545
val x6: Int =
46-
example.id[Int @qualified[Int]((x: Int) => x < 0)](1) +
46+
example.id[Int @qualified[Int]((x: Int) => x < 0)](-1) +
4747
example.id[example.Neg](-1)
4848
()
4949
}
@@ -87,8 +87,8 @@ package example {
8787
{
8888
case y @ _:Int @qualified[Int]((y: Int) => y > 0) =>
8989
println(
90-
_root_.scala.StringContext.apply(
91-
[""," is Int with x > 0" : String]*).s([y : Any]*)
90+
_root_.scala.StringContext.apply([""," is positive" : String]*).
91+
s([y : Any]*)
9292
)
9393
case _ =>
9494
()
@@ -102,8 +102,7 @@ package example {
102102
=>
103103
println(
104104
_root_.scala.StringContext.apply(
105-
[""," is Int with y > 0 and "," is Int with z > 0" : String]*)
106-
.s([y,z : Any]*)
105+
[""," and "," are both positive" : String]*).s([y,z : Any]*)
107106
)
108107
case _ =>
109108
()

tests/printing/qualified-types.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ def test() =
3333
x > 0
3434
} = 1
3535
val x5: Int with x > 0 = 1
36-
val x6: Int = id[{x: Int with x < 0}](1) + id[Neg](-1)
36+
val x6: Int = id[{x: Int with x < 0}](-1) + id[Neg](-1)
3737

3838
// `val x: Int with x > 0` is desugared to `val x: {x: Int with x > 0}`: if the
39-
// name of a qaulifier argument is not specified, it assumed the same as the
40-
// parent `val` definition.
39+
// name of a qualifier argument is not specified, it is assumed to be the same
40+
// as the parent `val` definition.
4141
def implicitArgumentName() =
4242
val x0: (Int with x0 > 0) | (String with x0 == "foo") = ???
4343
val x1: Int with x1 > 0 = ???
@@ -52,12 +52,12 @@ def implicitArgumentName() =
5252
val x9: Any = 42
5353
x9 match
5454
case y: Int with y > 0 =>
55-
println(s"$y is Int with x > 0")
55+
println(s"$y is positive")
5656
case _ => ()
5757

5858
x9 match
5959
case (y: Int with y > 0, z: Int with z > 0) =>
60-
println(s"$y is Int with y > 0 and $z is Int with z > 0")
60+
println(s"$y and $z are both positive")
6161
case _ => ()
6262

6363
def bar(x: Int with x > 0) = ???

0 commit comments

Comments
 (0)