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

Support for extension-type/inline-class #732

Closed
denniskaselow opened this issue Jan 15, 2024 · 8 comments
Closed

Support for extension-type/inline-class #732

denniskaselow opened this issue Jan 15, 2024 · 8 comments
Assignees

Comments

@denniskaselow
Copy link

It's probably too early and/or too minor, but would it be possible to already support extension types (like with -nullsafety)? The experiment has been enabled by default in the Dart dev version for a while now.

For example, if I have a getter returning an extension type, this is what I get:

Bad state: Interface type 'Age' which is nether an enum, nor a class, nor a mixin. This case is unknown, please report a bug.
package:mockito/src/builder.dart 1655:7                    _MockClassInfo._dummyValueImplementing
package:mockito/src/builder.dart 1549:12                   _MockClassInfo._dummyValue
package:mockito/src/builder.dart 1946:24                   _MockClassInfo._buildOverridingGetter

And I'm just seeing this, but there is a typo in the error message. It should be "neither" not "nether".

@yanok
Copy link
Contributor

yanok commented Feb 21, 2024

EDIT: uh, actually the feature is already there. Yep, I will have to find time to add the support then.

@yanok yanok self-assigned this Feb 21, 2024
@yanok
Copy link
Contributor

yanok commented Feb 27, 2024

The version at HEAD should now cover the "method returns an extension type" case. We'll do a release soon.

@yanok yanok closed this as completed Feb 27, 2024
@Rexios80
Copy link

Rexios80 commented Jul 7, 2024

@yanok what's the status of releasing this?

@renancaraujo
Copy link

renancaraujo commented Nov 26, 2024

This should be reopened until a release is made.

@eernstg
Copy link
Member

eernstg commented Nov 26, 2024

Extension types were released in Dart 3.3.0.

Is there still an issue with mockito, can it be demonstrated by a small example? In that case the issue should certainly be reopened (or a new issue could be created), if it isn't already reported in some other issue.

(I'm not working on mockito, I just wanted to mention that the extension type feature is in the language today.)

@denniskaselow
Copy link
Author

Basic extension type support was introduced because of this issue, but has not yet been published on pub as there has been no release for almost a year. Support for extension types with generics does not yet exist, even on the main branch.

A code example for the not working case of an extension type with generics is in issue: #755

@eernstg
Copy link
Member

eernstg commented Nov 27, 2024

Thanks! I asked around a bit to see if somebody can say more.

@renancaraujo
Copy link

What has stopped a release since February? Should package users expect one at all?

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

No branches or pull requests

5 participants