| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
test_wildcardVariable_constructorParameter() async {It would be great to add at least one test that ensures the expected behavior if wildcards are *not* enabled.
In the `DuplicateDefinitionTest`, for example we do this:
```
test_block_localFunction_wildcard_preWildcards() async {
await assertErrorsInCode(r'''
// @dart = 3.4
// (pre wildcard-variables)
void f() {
void _() {}
int _(int _) => 42;
String _(int _) => "42";
}
''', [
error(WarningCode.UNUSED_ELEMENT, 62, 1),
error(CompileTimeErrorCode.DUPLICATE_DEFINITION, 75, 1,
contextMessages: [message(testFile, 62, 1)]),
error(WarningCode.UNUSED_ELEMENT, 75, 1),
error(CompileTimeErrorCode.DUPLICATE_DEFINITION, 100, 1,
contextMessages: [message(testFile, 62, 1)]),
error(WarningCode.UNUSED_ELEMENT, 100, 1),
]);
}
```(3.4 is kind of arbitrary but safely *pre*-wildcards.)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
test_wildcardVariable_constructorParameter() async {It would be great to add at least one test that ensures the expected behavior if wildcards are *not* enabled.
In the `DuplicateDefinitionTest`, for example we do this:```
test_block_localFunction_wildcard_preWildcards() async {
await assertErrorsInCode(r'''
// @dart = 3.4
// (pre wildcard-variables)void f() {
void _() {}
int _(int _) => 42;
String _(int _) => "42";
}
''', [
error(WarningCode.UNUSED_ELEMENT, 62, 1),
error(CompileTimeErrorCode.DUPLICATE_DEFINITION, 75, 1,
contextMessages: [message(testFile, 62, 1)]),
error(WarningCode.UNUSED_ELEMENT, 75, 1),
error(CompileTimeErrorCode.DUPLICATE_DEFINITION, 100, 1,
contextMessages: [message(testFile, 62, 1)]),
error(WarningCode.UNUSED_ELEMENT, 100, 1),
]);
}
```(3.4 is kind of arbitrary but safely *pre*-wildcards.)
Good call, thanks! Added 3 new tests that mirrors the existing ones, but with the version set at 3.4.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[linter] Issue 60136: Update strict_top_level_inference to ignore wildcard variables.
Avoid linting on wildcard variables. Wildcard variables won't be used, so it's okay that the type will be `dynamic`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |