rspec/rules/S4977/dart/rule.adoc
2024-07-12 11:57:36 +02:00

34 lines
434 B
Plaintext

== 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]