Skip to content

Commit a191e24

Browse files
committed
Adjust wording
1 parent 0f60b26 commit a191e24

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

standard/classes.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ The ***not null*** constraint specifies that a type argument used for the type p
489489
490490
Because `notnull` is not a keyword, in *primary_constraint* the not null constraint is always syntactically ambiguous with *class_type*. For compatibility reasons, if a name lookup ([§12.8.4](expressions.md#1284-simple-names)) of the name `notnull` succeeds it is treated as a `class_type`. Otherwise it is treated as the not null constraint.
491491
492-
> *Example*: Consider the following:
492+
> *Example*: The following class demonstrates the use of various type arguments against different constraints, indicating warnings which may be issued by a compiler.
493493
>
494494
> <!-- Example: {template:"standalone-lib-without-using", name:"TypeParameterConstraints0", expectedWarnings:["CS8714","CS8714","CS8631"], ignoredWarnings:["CS0168"]} -->
495495
> ```csharp
@@ -504,15 +504,15 @@ Because `notnull` is not a keyword, in *primary_constraint* the not null constra
504504
> {
505505
> // nonnull constraint allows nonnullable struct type argument
506506
> A<int> x1;
507-
> // warning: nonnull constraint prohibits nullable struct type argument
507+
> // possible warning: nonnull constraint prohibits nullable struct type argument
508508
> A<int?> x2;
509-
> // nonnullconstraint allows nonnullable class type argument
509+
> // nonnull constraint allows nonnullable class type argument
510510
> A<C> x3;
511-
> // warning: nonnull constraint prohibits nullable class type argument
511+
> // possible warning: nonnull constraint prohibits nullable class type argument
512512
> A<C?> x4;
513513
> // nonnullable base class requirement allows nonnullable class type argument
514514
> B1<C> x5;
515-
> // warning: nonnullable base class requirement prohibits nullable class type argument
515+
> // possible warning: nonnullable base class requirement prohibits nullable class type argument
516516
> B1<C?> x6;
517517
> // nullable base class requirement allows nonnullable class type argument
518518
> B2<C> x7;

0 commit comments

Comments
 (0)