When SymbolDisplayCompilerInternalOptions.IncludeNonNullableTypeModifier is set and "TypeParameterSymbol.ReferenceTypeConstraintIsNullable == true", the class constraint should have an ExclamationToken. I.e. the output should look like class!.
Relevant code is in private void AddTypeParameterConstraints(ImmutableArray<ITypeSymbol> typeArguments).