Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint warning Avoid using dynamic typ on extension type with version 1.1.4 #142

Closed
quoc-huynh-cosee opened this issue Sep 23, 2024 · 3 comments · Fixed by #153
Closed

Lint warning Avoid using dynamic typ on extension type with version 1.1.4 #142

quoc-huynh-cosee opened this issue Sep 23, 2024 · 3 comments · Fixed by #153
Assignees
Labels
Error Report something not working

Comments

@quoc-huynh-cosee
Copy link

Describe the error
With the version 1.1.4 the dart_code_linter package, the following code raises a lint warning on the line final Asset asset:

extension type Asset(String path) { }

class TestClass {
  const TestClass({required this.asset});

  // Lint warning: Avoid using dynamic typ
  final Asset asset;
}

This warning is should not be triggered, as the Asset is a valid extension type. The warning does not occur in version 1.1.3 of dart_code_linter

How ​​to replicate the bug
Step by step to reproduce the error:

  1. Use dart_code_linter version 1.1.4.
  2. Define an extension type and use it as a class property as shown in the code above.
@quoc-huynh-cosee quoc-huynh-cosee added the Error Report something not working label Sep 23, 2024
@app-toolkit-opensource-innersource app-toolkit-opensource-innersource bot added the Review/Pending Initial stage of the issue to evaluate its approval label Sep 23, 2024

Assign to review: @santitigaga @ajtortolero

@santitigaga santitigaga removed the Review/Pending Initial stage of the issue to evaluate its approval label Nov 6, 2024
@santitigaga
Copy link
Contributor

@quoc-huynh-cosee You are right, It turns out that this functionality was released in a stable form in Dart version 3.3.0 and that scenario was not contemplated.

I hope to fix it tomorrow,Thanks for reporting it

@santitigaga santitigaga self-assigned this Nov 7, 2024
@santitigaga santitigaga linked a pull request Nov 7, 2024 that will close this issue
@santitigaga
Copy link
Contributor

@quoc-huynh-cosee This will be deployed in the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Report something not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants