rspec/rules/S4977/dart/rule.adoc

34 lines
434 B
Plaintext
Raw Normal View History

2024-07-11 22:29:05 +02:00
== Why is this an issue?
include::../description.adoc[]
=== Noncompliant code example
[source,dart]
----
class TypeParameterHidesAnotherType<T> {
T method<T> () { // Noncompliant
...
}
}
----
=== Compliant solution
[source,java]
----
class NoTypeParameterHiding<T> {
U method<U> () {
...
}
}
----
== Resources
* https://dart.dev/tools/linter-rules/avoid_shadowing_type_parameters[Dart Lint rule]