Skip to content

small English grammar fixes #9830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/core/Symbols.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Checking.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/neg-custom-args/kind-projector.check
Original file line number Diff line number Diff line change
Expand Up @@ -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]
2 changes: 1 addition & 1 deletion tests/neg/kinds1.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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] = ???
Expand Down
2 changes: 1 addition & 1 deletion tests/pending/neg/kinds1.check
Original file line number Diff line number Diff line change
@@ -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