Skip to content

Commit 1f40680

Browse files
authored
Merge pull request #191 from scala/backport-lts-3.3-22360
Backport "Improve the usage of inclusive language" to 3.3 LTS
2 parents 6c730b4 + b354b70 commit 1f40680

22 files changed

+301
-30
lines changed

compiler/src/dotty/tools/dotc/core/Contexts.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ object Contexts {
121121
* risk of capturing complete trees.
122122
* - To make sure these rules are kept, it would be good to do a sanity
123123
* check using bytecode inspection with javap or scalap: Keep track
124-
* of all class fields of type context; allow them only in whitelisted
124+
* of all class fields of type context; allow them only in allowlisted
125125
* classes (which should be short-lived).
126126
*/
127127
abstract class Context(val base: ContextBase) { thiscontext =>

compiler/src/dotty/tools/dotc/core/Names.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ object Names {
401401
}
402402

403403
/** It's OK to take a toString if the stacktrace does not contain a method
404-
* from GenBCode or it also contains one of the whitelisted methods below.
404+
* from GenBCode or it also contains one of the allowed methods below.
405405
*/
406406
private def toStringOK = {
407407
val trace: Array[StackTraceElement] = Thread.currentThread.nn.getStackTrace.asInstanceOf[Array[StackTraceElement]]

compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ class ClassfileParser(
904904

905905
// Nothing$ and Null$ were incorrectly emitted with a Scala attribute
906906
// instead of ScalaSignature before 2.13.0-M2, see https://github.com/scala/scala/pull/5952
907-
private val scalaUnpickleWhitelist = List(tpnme.nothingClass, tpnme.nullClass)
907+
private val scalaUnpickleAllowlist = List(tpnme.nothingClass, tpnme.nullClass)
908908

909909
/** Parse inner classes. Expects `in.bp` to point to the superclass entry.
910910
* Restores the old `bp`.
@@ -1028,7 +1028,7 @@ class ClassfileParser(
10281028
report.error(s"Found a TASTY attribute with a length different from 16 in $classfile. This is likely a bug in the compiler. Please report.", NoSourcePosition)
10291029
}
10301030

1031-
if scan(tpnme.ScalaATTR) && !scalaUnpickleWhitelist.contains(classRoot.name)
1031+
if scan(tpnme.ScalaATTR) && !scalaUnpickleAllowlist.contains(classRoot.name)
10321032
&& !(classRoot.name.startsWith("Tuple") && classRoot.name.endsWith("$sp"))
10331033
&& !(classRoot.name.startsWith("Product") && classRoot.name.endsWith("$sp"))
10341034
then
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
export-in-extension.scala
2+
i12456.scala
3+
i8623.scala
4+
i1642.scala
5+
i16696.scala
6+
constructor-proxy-values.scala
7+
i9328.scala
8+
i15414.scala
9+
i6796.scala
10+
i14013.scala
11+
toplevel-cyclic
12+
curried-dependent-ift.scala
13+
i17121.scala
14+
illegal-match-types.scala
15+
i13780-1.scala
16+
i20317a.scala
17+
i11226.scala
18+
i974.scala
19+
i13864.scala
20+
21+
# semantic db generation fails in the first compilation
22+
i1642.scala
23+
i15158.scala
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# cyclic reference crashes
2+
i4368.scala
3+
i827.scala
4+
cycles.scala
5+
i5332.scala
6+
i4369c.scala
7+
i1806.scala
8+
i0091-infpaths.scala
9+
exports.scala
10+
i14834.scala
11+
12+
# other type related crashes
13+
i4653.scala
14+
overrideClass.scala
15+
16+
# repeating <error> on a top level type definition
17+
i18750.scala
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## See #18882
2+
patmat.scala
3+
t9312.scala
4+
unapplySeq-implicit-arg.scala
5+
unapplySeq-implicit-arg2.scala
6+
unapplySeq-implicit-arg3.scala
7+
ScalaCheck.scala
8+
mutable-read8.scala
9+
TypeCast.scala
10+
global-cycle8.scala
11+
global-cycle6.scala
12+
i12544b.scala
13+
t9360.scala
14+
mutable-array.scala
15+
patmat-unapplySeq2.scala
16+
line-spacing.scala
17+
global-list.scala
18+
t5366.scala
19+
mutable-read7.scala
20+
t9115.scala
21+
Color.scala
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
i8752.scala
2+
f-interpolator-neg.scala # Additional: A pure expression does nothing in statement position
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
t7746.scala # order of exhaustivity suggestions differs
2+
t4408.scala # order of exhaustivity suggestions differs
3+
patmat-ortype.scala # order of exhaustivity suggestions differs
4+
i13003.scala # order of exhaustivity suggestions differs
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## See #18882
2+
patmat.scala
3+
patmat-interpolator.scala
4+
unapplySeq-implicit-arg-pos.scala
5+
global-cycle11.scala

0 commit comments

Comments
 (0)