You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.
When calling a generic constructor factory (the generated methods that start with _new), all parameters of type of a type variable are boxed implicitly. This should be avoided. Instead, get rid of the generic factory and call a specialized constructor directly (if it is fixed as described, it would probably also fix #4).
This only applies to constructors but not factories (Constructor factory != factory constructor)! Generic method specializations (#6) could be used to get rid of boxing when calling a factory constructor.
E.g.:
classA<T> {
T variable;
A(this.variable);
}
newA<int>(42); // 42 is boxed
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When calling a generic constructor factory (the generated methods that start with
_new
), all parameters of type of a type variable are boxed implicitly. This should be avoided. Instead, get rid of the generic factory and call a specialized constructor directly (if it is fixed as described, it would probably also fix #4).This only applies to constructors but not factories (Constructor factory != factory constructor)! Generic method specializations (#6) could be used to get rid of boxing when calling a factory constructor.
E.g.:
The text was updated successfully, but these errors were encountered: