mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-23 21:13:35 +00:00
fix: fix warnings
This commit is contained in:
@@ -65,7 +65,7 @@ class ModuleGenerator extends GeneratorForAnnotation<ann.module> {
|
|||||||
m
|
m
|
||||||
.computeConstantValue()
|
.computeConstantValue()
|
||||||
?.type
|
?.type
|
||||||
?.getDisplayString(withNullability: false)
|
?.getDisplayString()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.contains('singleton') ??
|
.contains('singleton') ??
|
||||||
false,
|
false,
|
||||||
@@ -79,7 +79,7 @@ class ModuleGenerator extends GeneratorForAnnotation<ann.module> {
|
|||||||
m
|
m
|
||||||
.computeConstantValue()
|
.computeConstantValue()
|
||||||
?.type
|
?.type
|
||||||
?.getDisplayString(withNullability: false)
|
?.getDisplayString()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.contains('named') ??
|
.contains('named') ??
|
||||||
false,
|
false,
|
||||||
@@ -108,7 +108,7 @@ class ModuleGenerator extends GeneratorForAnnotation<ann.module> {
|
|||||||
m
|
m
|
||||||
.computeConstantValue()
|
.computeConstantValue()
|
||||||
?.type
|
?.type
|
||||||
?.getDisplayString(withNullability: false)
|
?.getDisplayString()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.contains('named') ??
|
.contains('named') ??
|
||||||
false,
|
false,
|
||||||
@@ -124,22 +124,19 @@ class ModuleGenerator extends GeneratorForAnnotation<ann.module> {
|
|||||||
// Если указано имя для параметра (@named), пробрасываем его в resolve
|
// Если указано имя для параметра (@named), пробрасываем его в resolve
|
||||||
if (namedValue != null) {
|
if (namedValue != null) {
|
||||||
argExpr =
|
argExpr =
|
||||||
"currentScope.resolve<${p.type.getDisplayString(withNullability: false)}>(named: '$namedValue')";
|
"currentScope.resolve<${p.type.getDisplayString()}>(named: '$namedValue')";
|
||||||
} else {
|
} else {
|
||||||
// fallback — скобки все равно нужны
|
// fallback — скобки все равно нужны
|
||||||
argExpr =
|
argExpr = "currentScope.resolve<${p.type.getDisplayString()}>()";
|
||||||
"currentScope.resolve<${p.type.getDisplayString(withNullability: false)}>()";
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Если параметр не @named - просто resolve по типу
|
// Если параметр не @named - просто resolve по типу
|
||||||
argExpr =
|
argExpr = "currentScope.resolve<${p.type.getDisplayString()}>()";
|
||||||
"currentScope.resolve<${p.type.getDisplayString(withNullability: false)}>()";
|
|
||||||
}
|
}
|
||||||
return argExpr;
|
return argExpr;
|
||||||
}).join(', ');
|
}).join(', ');
|
||||||
|
|
||||||
final returnType =
|
final returnType = method.returnType.getDisplayString();
|
||||||
method.returnType.getDisplayString(withNullability: false);
|
|
||||||
final methodName = method.displayName;
|
final methodName = method.displayName;
|
||||||
|
|
||||||
// Если список параметров длинный — переносим вызов на новую строку для читаемости.
|
// Если список параметров длинный — переносим вызов на новую строку для читаемости.
|
||||||
|
|||||||
Reference in New Issue
Block a user