From 82541da3f93d2cba9b5525132281b301f68490b0 Mon Sep 17 00:00:00 2001 From: Ben Plommer Date: Wed, 16 Sep 2020 15:32:15 +0100 Subject: [PATCH 1/2] grammar fixes --- compiler/src/dotty/tools/dotc/core/Symbols.scala | 4 ++-- compiler/src/dotty/tools/dotc/typer/Checking.scala | 2 +- tests/neg-custom-args/kind-projector.check | 4 ++-- tests/neg/kinds1.scala | 2 +- tests/pending/neg/kinds1.check | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/core/Symbols.scala b/compiler/src/dotty/tools/dotc/core/Symbols.scala index 9b0b42734381..20df0e73a5be 100644 --- a/compiler/src/dotty/tools/dotc/core/Symbols.scala +++ b/compiler/src/dotty/tools/dotc/core/Symbols.scala @@ -199,7 +199,7 @@ object Symbols { } /** Enter this symbol in its class owner after given `phase`. Create a fresh - * denotation for its owner class if the class has not yet already one + * denotation for its owner class if the class does not already have one * that starts being valid after `phase`. * @pre Symbol is a class member */ @@ -225,7 +225,7 @@ object Symbols { } /** Remove symbol from scope of owning class after given `phase`. Create a fresh - * denotation for its owner class if the class has not yet already one that starts being valid after `phase`. + * denotation for its owner class if the class does not already have one that starts being valid after `phase`. * @pre Symbol is a class member */ def dropAfter(phase: DenotTransformer)(using Context): Unit = diff --git a/compiler/src/dotty/tools/dotc/typer/Checking.scala b/compiler/src/dotty/tools/dotc/typer/Checking.scala index ad0d7406369c..203587393df4 100644 --- a/compiler/src/dotty/tools/dotc/typer/Checking.scala +++ b/compiler/src/dotty/tools/dotc/typer/Checking.scala @@ -156,7 +156,7 @@ object Checking { if (arg.tpe.widen.isRef(defn.NothingClass) || !paramBounds.exists || arg.tpe.hasSameKindAs(paramBounds.bounds.hi)) arg - else errorTree(arg, em"Type argument ${arg.tpe} has not the same kind as its bound $paramBounds") + else errorTree(arg, em"Type argument ${arg.tpe} does not have the same kind as its bound $paramBounds") def preCheckKinds(args: List[Tree], paramBoundss: List[Type])(using Context): List[Tree] = { val args1 = args.zipWithConserve(paramBoundss)(preCheckKind) diff --git a/tests/neg-custom-args/kind-projector.check b/tests/neg-custom-args/kind-projector.check index 9bda8f03c6ba..1375cf22b3f9 100644 --- a/tests/neg-custom-args/kind-projector.check +++ b/tests/neg-custom-args/kind-projector.check @@ -5,8 +5,8 @@ -- Error: tests/neg-custom-args/kind-projector.scala:5:23 -------------------------------------------------------------- 5 |class Bar1 extends Foo[Either[*, *]] // error | ^^^^^^^^^^^^ - | Type argument Either has not the same kind as its bound [_$1] + | Type argument Either does not have the same kind as its bound [_$1] -- Error: tests/neg-custom-args/kind-projector.scala:6:22 -------------------------------------------------------------- 6 |class Bar2 extends Foo[*] // error | ^ - | Type argument _$4 has not the same kind as its bound [_$1] + | Type argument _$4 does not have the same kind as its bound [_$1] diff --git a/tests/neg/kinds1.scala b/tests/neg/kinds1.scala index 8f7a9f315dc9..2c6bad624559 100644 --- a/tests/neg/kinds1.scala +++ b/tests/neg/kinds1.scala @@ -5,7 +5,7 @@ object Test { class B - val x: C[C] = ??? // error: Type argument has not the same kind as its bound + val x: C[C] = ??? // error: Type argument does not have the same kind as its bound val y: C2[C] = ??? def f[T] = ??? diff --git a/tests/pending/neg/kinds1.check b/tests/pending/neg/kinds1.check index 95009fad95cb..9b2456ebbff6 100644 --- a/tests/pending/neg/kinds1.check +++ b/tests/pending/neg/kinds1.check @@ -1,2 +1,2 @@ [68..69] in kinds1.scala -Type argument Test.C has not the same kind as its bound +Type argument Test.C does not have the same kind as its bound From b02858eb053e3da7a1b02b6d379c34fa0adbaa9a Mon Sep 17 00:00:00 2001 From: Ben Plommer Date: Sat, 19 Sep 2020 10:28:03 +0100 Subject: [PATCH 2/2] revert whitespace addition --- tests/neg/kinds1.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/neg/kinds1.scala b/tests/neg/kinds1.scala index 2c6bad624559..bec780cd4bc8 100644 --- a/tests/neg/kinds1.scala +++ b/tests/neg/kinds1.scala @@ -5,7 +5,7 @@ object Test { class B - val x: C[C] = ??? // error: Type argument does not have the same kind as its bound + val x: C[C] = ??? // error: Type argument does not have the same kind as its bound val y: C2[C] = ??? def f[T] = ???