Skip to content

Commit

Permalink
Modify rule S7047: Fix formatting of inline code and grammar (#4211)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioaversa authored Aug 30, 2024
1 parent 1cdcbab commit a503352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/S7047/dart/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Given a type parameter `T`, the type `T?` is nullable version of `T`, i.e. A var

However, when `T` itself is bound to a nullable type, a variable `y` of type `T` can hold a `null` value by itself. For example, if `y` is defined as `int?`, `null` is a valid value for `y`.

Therefore, when `T` is bound to a nullable type, `x` can be hold `null` as a valid value, which means that `x!` is an incorrect check for the validity of `x`, since it would raise a runtime exception when `x ` holds `null`.
Therefore, when `T` is bound to a nullable type, `x` can hold `null` as a valid value, which means that `x!` is an incorrect check for the validity of `x`, since it would raise a runtime exception when `x` holds `null`.

[source,dart]
----
Expand Down

0 comments on commit a503352

Please sign in to comment.