Skip to content

Commit 5dffc09

Browse files
authored
Merge pull request #381 from ashawley/dotty-0.21
Update dotty 0.21.0-RC1
2 parents a3aa139 + a5a497b commit 5dffc09

File tree

10 files changed

+24
-25
lines changed

10 files changed

+24
-25
lines changed

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ workflows:
8989
java_version: jdk8
9090
scala_version: 2.13.1
9191
- scala_job:
92-
name: dotty-0.18
92+
name: dotty-0.21
9393
java_version: jdk8
94-
scala_version: 0.20.0-RC1
94+
scala_version: 0.21.0-RC1
9595
- scala_job:
9696
name: jdk11_2.12
9797
java_version: jdk11
@@ -103,7 +103,7 @@ workflows:
103103
- scala_job:
104104
name: jdk11_dotty
105105
java_version: jdk11
106-
scala_version: 0.20.0-RC1
106+
scala_version: 0.21.0-RC1
107107
- scala_job:
108108
name: jdk13_2.12
109109
java_version: jdk13
@@ -115,7 +115,7 @@ workflows:
115115
- scala_job:
116116
name: jdk13_dotty
117117
java_version: jdk13
118-
scala_version: 0.20.0-RC1
118+
scala_version: 0.21.0-RC1
119119
- scala_job:
120120
name: jdk14_2.12
121121
java_version: jdk14
@@ -127,7 +127,7 @@ workflows:
127127
- scala_job:
128128
name: jdk14_dotty
129129
java_version: jdk14
130-
scala_version: 0.20.0-RC1
130+
scala_version: 0.21.0-RC1
131131
- scalajs_job:
132132
name: sjs0.6_2.12
133133
scala_version: 2.12.10

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import: scala/scala-dev:travis/default.yml
55
language: scala
66

77
scala:
8-
- 0.20.0-RC1
8+
- 0.21.0-RC1
99
- 2.12.10
1010
- 2.13.1
1111

@@ -18,9 +18,9 @@ env:
1818

1919
matrix:
2020
exclude:
21-
- scala: 0.20.0-RC1
21+
- scala: 0.21.0-RC1
2222
env: SCALAJS_VERSION=0.6.31 ADOPTOPENJDK=8
23-
- scala: 0.20.0-RC1
23+
- scala: 0.21.0-RC1
2424
env: SCALAJS_VERSION=1.0.0-RC2 ADOPTOPENJDK=8
2525

2626
install:

jvm/src/test/scala/scala/xml/XMLTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class XMLTestJVM {
116116
Elem(null, "title", e, sc, Text("Foundations of Programming Languages"))))
117117

118118
assertEquals("<book><author>Peter Buneman</author><author>Dan Suciu</author><title>Data on ze web</title></book>",
119-
(parsedxml2 \\ "book") { n: Node => (n \ "title") xml_== "Data on ze web" } toString)
119+
(parsedxml2 \\ "book") { (n: Node) => (n \ "title") xml_== "Data on ze web" } toString)
120120

121121
assertTrue(
122122
((NodeSeq.fromSeq(List(parsedxml2))) \\ "_") sameElements List(
@@ -408,7 +408,7 @@ class XMLTestJVM {
408408

409409
@UnitTest
410410
def t5115 = {
411-
def assertHonorsIterableContract(i: Iterable[_]) = assertEquals(i.size, i.iterator.size)
411+
def assertHonorsIterableContract(i: Iterable[_]) = assertEquals(i.size.toLong, i.iterator.size.toLong)
412412

413413
assertHonorsIterableContract(<a/>.attributes)
414414
assertHonorsIterableContract(<a x=""/>.attributes)

shared/src/main/scala/scala/xml/dtd/ElementValidator.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,11 @@ class ElementValidator() extends Function1[Node, Boolean] {
7070
for (attr <- md) {
7171
def attrStr = attr.value.toString
7272
def find(Key: String): Option[AttrDecl] = {
73-
adecls.zipWithIndex find {
73+
adecls.zipWithIndex collectFirst {
7474
case (a@AttrDecl(Key, _, _), j) =>
75-
ok += j; return Some(a)
76-
case _ => false
75+
ok += j
76+
a
7777
}
78-
None
7978
}
8079

8180
find(attr.key) match {

shared/src/main/scala/scala/xml/include/sax/XIncludeFilter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,10 @@ class XIncludeFilter extends XMLFilterImpl {
291291
val reader = new InputStreamReader(in, encoding)
292292
val c = new Array[Char](1024)
293293
var charsRead: Int = 0 // bogus init value
294-
do {
294+
while ({ {
295295
charsRead = reader.read(c, 0, 1024)
296296
if (charsRead > 0) this.characters(c, 0, charsRead)
297-
} while (charsRead != -1)
297+
} ; charsRead != -1}) ()
298298
} catch {
299299
case e: UnsupportedEncodingException =>
300300
throw new SAXException("Unsupported encoding: "

shared/src/main/scala/scala/xml/parsing/MarkupParserCommon.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ private[scala] trait MarkupParserCommon extends TokenTests {
115115

116116
val buf = new StringBuilder
117117

118-
do buf append ch_returning_nextch
119-
while (isNameChar(ch))
118+
while ({ buf append ch_returning_nextch
119+
; isNameChar(ch)}) ()
120120

121121
if (buf.last == ':') {
122122
reportSyntaxError("name cannot end in ':'")

shared/src/test/scala/scala/xml/AttributeTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class AttributeTest {
2424
appended = appended.next
2525
len = len + 1
2626
}
27-
assertEquals("removal of duplicates for unprefixed attributes in append", 1, len)
27+
assertEquals("removal of duplicates for unprefixed attributes in append", 1L, len.toLong)
2828
}
2929

3030
@Test
@@ -151,7 +151,7 @@ class AttributeTest {
151151
def attributePathTwoChildrenWithAttributes: Unit = {
152152
val xml = <a><b bar="1" /><b bar="2" /></a>
153153
val b = xml \ "b"
154-
assertEquals(2, b.length)
154+
assertEquals(2, b.length.toLong)
155155
assertEquals(NodeSeq.fromSeq(Seq(<b bar="1"/>, <b bar="2"/>)), b)
156156
val barFail = b \ "@bar"
157157
val barList = b.map(_ \ "@bar")

shared/src/test/scala/scala/xml/UtilityTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class UtilityTest {
194194
'\u001F' -> "^_", // Unit separator
195195
'\u007F' -> "^?" // Delete
196196
).toMap.withDefault {
197-
key: Char => key.toString
197+
(key: Char) => key.toString
198198
}
199199

200200
def issue73StartsWithAndEndsWithWSInFirst: Unit = {

shared/src/test/scala/scala/xml/XMLSyntaxTest.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ class XMLSyntaxTest {
2929
assertEquals(1.5, handle[Double](xb), 0.0)
3030

3131
val xc = <hello>{ 5 }</hello>
32-
assertEquals(5, handle[Int](xc))
32+
assertEquals(5, handle[Int](xc).toLong)
3333

3434
val xd = <hello>{ true }</hello>
3535
assertEquals(true, handle[Boolean](xd))
3636

3737
val xe = <hello>{ 5:Short }</hello>
38-
assertEquals((5:Short), handle[Short](xe))
38+
assertEquals((5:Short).toLong, handle[Short](xe).toLong)
3939

4040
val xf = <hello>{ val x = 27; x }</hello>
41-
assertEquals(27, handle[Int](xf))
41+
assertEquals(27, handle[Int](xf).toLong)
4242

4343
val xg = <hello>{ List(1,2,3,4) }</hello>
4444
assertEquals("<hello>1 2 3 4</hello>", xg.toString)

shared/src/test/scala/scala/xml/XMLTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ Ours is the portal of hope, come as you are."
461461

462462
@UnitTest
463463
def t5115 = {
464-
def assertHonorsIterableContract(i: Iterable[_]) = assertEquals(i.size, i.iterator.size)
464+
def assertHonorsIterableContract(i: Iterable[_]) = assertEquals(i.size.toLong, i.iterator.size.toLong)
465465

466466
assertHonorsIterableContract(<a/>.attributes)
467467
assertHonorsIterableContract(<a x=""/>.attributes)

0 commit comments

Comments
 (0)