-
Notifications
You must be signed in to change notification settings - Fork 200
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
Macro - Augment class with generic #3922
Comments
I think getting the generics right here is simply not implemented yet. See also #3879 for discussion as to whether it might be useful augmentation libraries were less strict here. |
Hello @davidmorgan, thank you for your reply! |
Yeah this just seems like a bug in the code producing the augmentation for types with generics. |
Fix out here https://dart-review.googlesource.com/c/sdk/+/372580 |
Thanks you so much 🙏 |
Bug: dart-lang/language#3922 Change-Id: I9d9f6ce898e16e2ed393ae77f0dbcbf9c75fb56d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372580 Auto-Submit: Jake Macdonald <jakemac@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
This should be resolved, but you may need to wait a bit for a dev SDK to be released that includes the fix (needs to be >= 3.5.0-288.0.dev) |
No problem, thank you. |
Hi, I'm trying to apply a macro to a class that has a generic.
To experiment a little with the meta-programming approach, I set myself the goal of creating a mini ORM based on models such as Symfony or Adonis.
I have one model, that represent database table in Dart context.
The macro
@Model()
provides a static function for obtaining an instance of my query builder.Then my main
I have this error in my console when I run my application 👀
I'd like to know whether this problem is actually a limitation to the use of macros or whether I'm doing it wrong. If so, could you give me some alternatives?
The text was updated successfully, but these errors were encountered: