-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 declaration of generic type for methods #254
Comments
This comment was originally written by [email protected] Removed Type-Defect label. |
Added apr30-triage label. |
Removed apr30-triage label. |
Added triage1 label. |
I think type inference and generic functions go hand in hand. Since I would prefer not having type inference in Dart, I would prefer to not have generic functions. |
This comment was originally written by [email protected] I want to write top-level function with generics. for example, I create this top-level function. use this function invalid case. and raise a type mismatch error on IDE. (google group log) https://groups.google.com/a/dartlang.org/d/topic/misc/6eTB2Vrrwh0/discussion |
This comment was originally written by [email protected] This would be especially helpful in Futures API. There are transform methods which would be improved if they had generics. |
Issue #7099 has been merged into this issue. |
Issue #11033 has been merged into this issue. |
1 similar comment
Issue #11033 has been merged into this issue. |
Issue #11689 has been merged into this issue. |
I could easily live with generic methods without type inference. As long as you don't specify the type, it'll just default to "dynamic" anyway, but it would still improve documentation, and you can use it if you want. It's better than just using dynamic, which is the other option. T id<T>(T value) => value; int x = id<int>("not an int"); // Static type warning! Checked mode error! So, can we have it, please? |
Same here. It would improve documentation and completion so much... (plus it would help the editor's inference for providing completion even when you don't specify the type explicitly). |
It seems to be tribal knowledge among the language designers that "specifying type inference is bad". Has anyone spelled out why this is bad? I don't seem to recall ever seeing an explanation here. The trend for other statically-typed OOP languages (Java, C#, Scala, TypeScript, et. al.) is towards (local, bottom-up) type inference, so I'm interested to know the rationale behind our desire to go the other direction. |
I don't know what the exact motivations are but I can see one reason why it If it bails out by issuing an error message that's not dart-ey. If it Even if there wasn't the bailout issue, using type inference for generics |
This comment was originally written by @simonpai The motivation to have method scope generic type parameter is exactly the motivation to have class scope generic type. Of course adding a feature will add complexity to a language and its implementation, but the arguments about challenges brought by type inference also applies to class scope generic type as well. If it's really that bad, why doesn't Dart just remove all generics features anyway? |
Simon, the difference between generic constructors and generic methods is that people generally expect that you have to specify the type parameters on a constructor and they don't expect to always have to specify the type parameters on a generic method, thus more pressure a type inference. |
Is there a meta bug that is tracking implementation scope? What does "runtime support in VM" mean? I thought the VM supports generic methods? |
it means reified types: class C<T> { get t => T; }
f<T>() => T;
main() {
print(new C<int>().t); // int
print(f<int>()); // dynamic, but should be int
} |
It parses the syntax but treats all type arguments as dynamic. This does not do anything useful in the VM right now: isOfType<T>(Object obj) {
print(obj is T);
}
I couldn't find one. I emailed the language team to see what the plan for that is. |
Ah, gotcha. Thanks for the clarification. |
Any update on this? Is the plan to eventually fully support reified generics on methods? |
The plan is to fully support reified generics on methods in strong mode and
in Dart 2 (which will be similar to strong mode).
I'm not absolutely sure where strong mode is right now - it already
supported parameters written in comments, and I *think* it works correctly
with the real syntax too.
We support the syntax, but ignore the actual parameters, in Dart 1
implementations to make the transition easier.
/L
…On Tue, Jan 3, 2017 at 7:10 AM, Brad Jones ***@***.***> wrote:
Any update on this? Is the plan to eventually fully support reified
generics on methods?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#254 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEo9B_7w8Nq9d8nIfr88ubTDZ5c746LFks5rOeZSgaJpZM4E39PU>
.
--
Lasse R.H. Nielsen - [email protected]
'Faith without judgement merely degrades the spirit divine'
Google Denmark ApS - Frederiksborggade 20B, 1 sal - 1360 København K
- Denmark - CVR nr. 28 86 69 84
|
@lrhn This is the first I'm hearing of Dart 2. Is there any place I can get some information on it? |
Maybe @irhn is referring to V1.22 ??? |
On Tue, Jan 3, 2017 at 7:42 AM, Scott Pierce ***@***.***> wrote:
@lrhn <https://github.com/lrhn> This is the first I'm hearing of Dart 2.
Is there any place I can get some information on it?
Currently Strong Mode is not really officially Dart (it's not in the spec),
but it is quite successful, so eventually we will nail it down and make it
officially official. We're reserving the version number 2.0 for that time :)
Adding the *syntax* for generic methods (which was released in v.1.21),
without actually implementing them except in strong mode, is a step towards
supporting strong mode.
/L 'When its ready!'
--
Lasse R.H. Nielsen - [email protected]
'Faith without judgement merely degrades the spirit divine'
Google Denmark ApS - Frederiksborggade 20B, 1 sal - 1360 København K
- Denmark - CVR nr. 28 86 69 84
|
So is it safe to say that if you want to catch up with Dart 2 it is
recommended for you to already use strong mode once you can?
… > @lrhn <https://github.com/lrhn> This is the first I'm hearing of Dart 2.
> Is there any place I can get some information on it?
>
Currently Strong Mode is not really officially Dart (it's not in the spec),
but it is quite successful, so eventually we will nail it down and make it
officially official. We're reserving the version number 2.0 for that time
:)
Adding the *syntax* for generic methods (which was released in v.1.21),
without actually implementing them except in strong mode, is a step towards
supporting strong mode.
--
Jonathan Rezende
|
Yes, definitely. :) |
any news on this? |
The limited level of support for generic methods that we call generic method syntax is what we plan to support for Dart 1.x. For full support of generic functions you'd need to switch to strong mode, including the strong mode run-time semantics, or wait for Dart 2.0 (and strong mode is essentially a preview of Dart 2.0). Note, however, that a language like Java has had generic methods for many years at this level (because type arguments are never reified in Java), and it's not useless: The static checks that you get with strong mode static analysis (e.g., Edit Aug 29, 2017: Updated link to current version of informal spec of generic method syntax. |
@eernstg, can I have full generics with strong mode? About Java... |
You have full generics with strong mode, but the only compiler that can
compile strong mode is DDC.
If you run with the VM or compile with dart2js, then you will get
non-strong mode semantics and no reified method type parameters.
/L
…On Wed, Apr 5, 2017 at 4:17 PM, jodinathan ***@***.***> wrote:
@eernstg <https://github.com/eernstg>, can I have full generics with
strong mode?
Because I am using it with "analyzer: strong-mode: true" and T is still
dynamic.
About Java...
Personally, I try to compare Dart to more modern language like C#.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#254 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEo9B2ZG65JJFUvgeqrdx7YZCvYHm8Skks5rs6KDgaJpZM4E39PU>
.
--
Lasse R.H. Nielsen - [email protected]
'Faith without judgement merely degrades the spirit divine'
Google Denmark ApS - Frederiksborggade 20B, 1 sal - 1360 København K
- Denmark - CVR nr. 28 86 69 84
|
Right, and I'll make Lasse's explanation a bit more explicit, because we need to make some distinctions that may not be entirely obvious. With DDC will generate code that obeys the strong mode run-time semantics; e.g., it will consider a The situation where you use strong mode static analysis and then run your program using Dart 1.x semantics may seem to be a crazy hybrid that you should never even get close enough to shake a stick at. However, the situation isn't actually so bad. There are lots of situations where strong mode static analysis will reject a program as erroneous, and Dart 1.x static analysis just emits a warning. Given that Dart 1.x warnings generally mean "this is an error, but we can fix it for you" (so you should never ignore them), this is a matter of workflow and not really language semantics. The function type subtype rules in Dart 1.x are very, very forgiving, and basically the function type subtypes in strong mode are just picking the subset of cases that will actually work. This will allow your strong-mode-checked program to continue to run in some situations where it is passing around "a bad function" (say, because an When it comes to generic methods/functions, your strong-mode-checked program will use the value The With this in mind, we think that it does make sense to run programs in Dart 1.x mode after checking them with strong-mode static analysis. That said, it will be a relief and an improvement when we get strong mode semantics everywhere, too. About Java and C#: It isn't necessarily fair to consider reification of type arguments as a modern trait, and erasure as old-fashioned. In the functional community it has been considered as an important property that polymorphic types can be handled in a parametric manner, which basically means that it must be completely impossible for the implementation of any given polymorphic programming abstraction (say, a generic function) to depend on the actual type arguments. In return for this particular restriction, we get theorems for free. This may indeed be helpful for developers when they are reasoning about their software (e.g., about whether a particular modification preserves the meaning of the program as a whole), but it tends to conflict with another very deep force: Object orientation relies on the ability of objects to report on their type ("I'm a String!", "I'm a BankAccount!"), because this is required in order to allow method invocation to be late-bound (such that we can call the correct method implementation for the given object, which is not known statically). An obviously correct treatment of type parameters in a strictly parametric setup is to erase them. When they've been checked (at compile-time), we don't need them any more. Reification of type arguments is not something that was invented along with C#, it was part of BETA already in the 1970'ies (in the shape of virtual patterns, which are actually more powerful than type arguments as we know them today). People will be quick to claim that Java uses erasure because it was impossible to reconcile reified type arguments with the installed base of Java software, and that may indeed be true, but I also think there is a connection to this ancient war between the "theorems for free" crowd and the "OO" crowd. In C#, they made a better choice at some point, at least as seen from the OO side. In any case, we will have reified generics in Dart, and you can get the full package with strong mode and DDC, and strong-mode-checks-plus-Dart-1.x-semantics as a meaningful stepping stone. Hope you can live with that for the limited amount of time where it's needed. ;-) (About the notation: |
Can this be closed? |
yup! this was fixed in #27501 |
convert (https://github.com/dart-lang/convert/compare/f0acc6b..4feeb10): 4feeb10 2022-10-12 Kevin Moore Fix comment references, update lints, require latest Dart SDK (#69) 8d8c1d3 2022-10-12 Moritz Bump version for publication (#68) stack_trace (https://github.com/dart-lang/stack_trace/compare/2194227..9697e4c): 9697e4c 2022-10-12 Kevin Moore Enable browser testing on CI, fix one test with browser-specific issues (#120) 6af4349 2022-10-12 Kevin Moore Fix comment reference issues, among other new lints (#119) webdriver (https://github.com/google/webdriver.dart/compare/e1a9ad6..f56cc6a): f56cc6a 2022-10-11 Nate Bosch Throw UnkownCommandException for 405 status code (#255) 63d58f0 2022-10-11 Tijo Jose Make the `waitFor` utilities return `Future<T>` instead of `Future<T?>`. (#254) Change-Id: Iecf27c64bc05b9937a93e6f8f555b3cfe893ee36 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263980 Reviewed-by: Kevin Moore <[email protected]> Commit-Queue: Devon Carew <[email protected]> Auto-Submit: Devon Carew <[email protected]>
…ion, dartdoc, ecosystem, file, glob, html, http_multi_server, http_parser, json_rpc_2, mockito, package_config, protobuf, pub_semver, source_maps, source_span, sync_http, test_reflective_loader, usage, vector_math, web_socket_channel, webdriver Revisions updated by `dart tools/rev_sdk_deps.dart`. args (https://github.com/dart-lang/args/compare/da56b18..5a4e16f): 5a4e16f 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#254) bazel_worker (https://github.com/dart-lang/bazel_worker/compare/f950bbf..159e671): 159e671 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#80) benchmark_harness (https://github.com/dart-lang/benchmark_harness/compare/fde73cb..7d0d28e): 7d0d28e 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#92) characters (https://github.com/dart-lang/characters/compare/ec844db..7633a16): 7633a16 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#86) collection (https://github.com/dart-lang/collection/compare/1a9b7eb..91afde4): 91afde4 2023-09-02 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#311) dartdoc (https://github.com/dart-lang/dartdoc/compare/695b218..a32ba3a): a32ba3a1 2023-09-05 Parker Lougheed Enable accidentally disabled reflective parameter test (#3490) 0c0cb4ed 2023-09-04 dependabot[bot] Bump actions/checkout from 3.5.3 to 4.0.0 (#3492) 08d8d9c4 2023-09-01 Sam Rawlins Implement much support for extension types (#3489) ecosystem (https://github.com/dart-lang/ecosystem/compare/89e58de..2e6c3ec): 2e6c3ec 2023-09-05 Hossein Yousefi Fix Publish Workflow (#162) 2e532e3 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#161) file (https://github.com/google/file.dart/compare/5d9a602..a18ad1c): a18ad1c 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.2 to 3.6.0 (#228) glob (https://github.com/dart-lang/glob/compare/5b24393..9c1996f): 9c1996f 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#82) html (https://github.com/dart-lang/html/compare/4060496..a1b193e): a1b193e 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#225) http_multi_server (https://github.com/dart-lang/http_multi_server/compare/aa128cf..9d62ea3): 9d62ea3 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#57) http_parser (https://github.com/dart-lang/http_parser/compare/c14fbf6..d2d03e7): d2d03e7 2023-09-02 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#77) json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/509f71e..50a3786): 50a3786 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#101) mockito (https://github.com/dart-lang/mockito/compare/f5abf11..412c0be): 412c0be 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#692) package_config (https://github.com/dart-lang/package_config/compare/981c49d..ae7ad83): ae7ad83 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#140) protobuf (https://github.com/dart-lang/protobuf/compare/5e8f36b..c16bc89): c16bc89 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.2 to 3.6.0 (#873) pub_semver (https://github.com/dart-lang/pub_semver/compare/028b435..f0be74a): f0be74a 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#91) source_maps (https://github.com/dart-lang/source_maps/compare/97c4833..eb3d40a): eb3d40a 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#81) source_span (https://github.com/dart-lang/source_span/compare/37735ae..48d0f57): 48d0f57 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#101) sync_http (https://github.com/dart-lang/sync_http/compare/c3d6ad4..8233f74): 8233f74 2023-09-01 Devon Carew Merge pull request #37 from google/dependabot/github_actions/actions/checkout-3.6.0 57dc02b 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.2 to 3.6.0 test_reflective_loader (https://github.com/dart-lang/test_reflective_loader/compare/0bfaad9..45c57d6): 45c57d6 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#51) usage (https://github.com/dart-lang/usage/compare/09bb847..7b12d51): 7b12d51 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#197) vector_math (https://github.com/google/vector_math.dart/compare/88bada3..d54af8a): d54af8a 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.2 to 3.6.0 (#301) web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/4d1b543..af945f1): af945f1 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#283) webdriver (https://github.com/google/webdriver.dart/compare/20ec47f..21976d6): 21976d6 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.2 to 3.6.0 (#279) 352b9b6 2023-09-01 dependabot[bot] Bump nanasess/setup-chromedriver from 1.1.0 to 2.2.0 (#278) Change-Id: I0b1f7a8851a7ee992d5b67a221ab523f55b51240 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324261 Auto-Submit: Devon Carew <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
…, convert, crypto, csslib, ecosystem, ffi, file, fixnum, html, http, lints, logging, markdown, matcher, mime, native, path, pool, protobuf, pub_semver, shelf, source_map_stack_trace, source_maps, source_span, sse, stack_trace, stream_channel, string_scanner, term_glyph, test_descriptor, test_process, test_reflective_loader, tools, typed_data, watcher, web_socket_channel, webdriver, webkit_inspection_protocol, yaml, yaml_edit Revisions updated by `dart tools/rev_sdk_deps.dart`. async (https://github.com/dart-lang/async/compare/def4482..9924570): 9924570 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#255) 61cdb0f 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#254) boolean_selector (https://github.com/dart-lang/boolean_selector/compare/479e1c1..7f523c3): 7f523c3 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#53) 1ed2941 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#54) browser_launcher (https://github.com/dart-lang/browser_launcher/compare/c2871b2..4f9e784): 4f9e784 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#51) 706c031 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#52) cli_util (https://github.com/dart-lang/cli_util/compare/56c1235..500dffa): 500dffa 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#91) c66e201 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#92) clock (https://github.com/dart-lang/clock/compare/200a020..f975668): f975668 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#59) eb5d2f5 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#58) convert (https://github.com/dart-lang/convert/compare/03242b2..f24afa7): f24afa7 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#89) a3e9bc5 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#90) crypto (https://github.com/dart-lang/crypto/compare/36ead7c..f3e64d2): f3e64d2 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#155) 7a7b517 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#156) csslib (https://github.com/dart-lang/csslib/compare/f6b68dd..17346e5): 17346e5 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#191) 4bdc553 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#192) ecosystem (https://github.com/dart-lang/ecosystem/compare/4acfcaf..dda7886): dda7886 2023-11-01 dependabot[bot] Bump peter-evans/create-or-update-comment (#192) b681c56 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#193) 0d768d4 2023-11-01 dependabot[bot] Bump subosito/flutter-action from 2.10.0 to 2.12.0 (#190) 178d244 2023-11-01 dependabot[bot] Bump actions/github-script (#194) 4b3e572 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#191) ffi (https://github.com/dart-lang/ffi/compare/2faec28..c926657): c926657 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#219) 3181ec0 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#220) file (https://github.com/google/file.dart/compare/7418131..e7c03aa): e7c03aa 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.6.0 (#233) fixnum (https://github.com/dart-lang/fixnum/compare/ef45eb5..3279f5d): 3279f5d 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#120) 4913894 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#121) html (https://github.com/dart-lang/html/compare/49e2c8e..06bc148): 06bc148 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#232) 2630607 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#233) http (https://github.com/dart-lang/http/compare/7240d0a..b9389fe): b9389fe 2023-11-01 dependabot[bot] Bump futureware-tech/simulator-action from 2 to 3 (#1037) d7c36ae 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#1038) lints (https://github.com/dart-lang/lints/compare/5c60f48..f58fd77): f58fd77 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#168) logging (https://github.com/dart-lang/logging/compare/642ed21..324a0b5): 324a0b5 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#150) e9b13b7 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#151) markdown (https://github.com/dart-lang/markdown/compare/4e2e970..efb73b3): efb73b3 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#561) 2e4a3bc 2023-11-01 dependabot[bot] Bump subosito/flutter-action from 2.10.0 to 2.11.0 (#559) 22e378b 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#560) matcher (https://github.com/dart-lang/matcher/compare/7512f80..3d03fa1): 3d03fa1 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#231) b7d24c8 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#232) mime (https://github.com/dart-lang/mime/compare/af3e5fe..8ebf946): 8ebf946 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#108) 4328d32 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#107) native (https://github.com/dart-lang/native/compare/279094d..de9d59e): de9d59e 2023-11-01 Daco Harkes [infra] Fix PR publisher comments (#177) 22b6b24 2023-11-01 Daco Harkes [infra] Rename `dart.yaml` to `native.yaml` (#176) cc42fb1 2023-11-01 Daco Harkes [native_toolchain_c] Use sysroot on Android (#180) 01d92b0 2023-11-01 Daco Harkes [native_toolchain_c] Bump highest tested NDK version to 34 (#182) 53facde 2023-11-01 Daco Harkes [native_toolchain_c] Fix NDK discovery (#179) 285ee6c 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#174) 46a05e4 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#172) 23187fe 2023-11-01 dependabot[bot] Bump nttld/setup-ndk from 1.3.1 to 1.4.1 (#173) path (https://github.com/dart-lang/path/compare/4ca27d4..18ec71f): 18ec71f 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#153) f26c20c 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#154) pool (https://github.com/dart-lang/pool/compare/5ccef15..c78cef4): c78cef4 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#76) protobuf (https://github.com/dart-lang/protobuf/compare/3f567b2..dcec2ed): dcec2ed 2023-10-31 Ömer Sinan Ağacan Annotate deepCopy with @useResult (#897) pub_semver (https://github.com/dart-lang/pub_semver/compare/8e5a58f..f9e94ee): f9e94ee 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#95) 81fdbcf 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#94) shelf (https://github.com/dart-lang/shelf/compare/c15fc6f..b3adc7c): b3adc7c 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#391) baea52d 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#392) source_map_stack_trace (https://github.com/dart-lang/source_map_stack_trace/compare/73d449c..2209626): 2209626 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#45) bfa3949 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#44) source_maps (https://github.com/dart-lang/source_maps/compare/fc6aa16..87dc587): 87dc587 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#84) 33ba11d 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#85) source_span (https://github.com/dart-lang/source_span/compare/92e50bf..ed16e0d): ed16e0d 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#105) aacd748 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#104) sse (https://github.com/dart-lang/sse/compare/37df57d..8ddb95f): 8ddb95f 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#95) 8830125 2023-11-01 dependabot[bot] Bump nanasess/setup-chromedriver from 2.2.0 to 2.2.1 (#94) 86dd8f9 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#93) stack_trace (https://github.com/dart-lang/stack_trace/compare/634589f..6496ff8): 6496ff8 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#145) 3d60304 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#144) stream_channel (https://github.com/dart-lang/stream_channel/compare/ffdb208..178104d): 178104d 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#98) 1193387 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#97) string_scanner (https://github.com/dart-lang/string_scanner/compare/9c525f7..a7105ef): a7105ef 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#65) f33ca6f 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#66) term_glyph (https://github.com/dart-lang/term_glyph/compare/cff80de..7c1eb9d): 7c1eb9d 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#45) 39073ca 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#44) test_descriptor (https://github.com/dart-lang/test_descriptor/compare/55b5eac..c417cbb): c417cbb 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#59) dcfde39 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#58) test_process (https://github.com/dart-lang/test_process/compare/d610333..c21e40d): c21e40d 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#51) bfd0576 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#50) test_reflective_loader (https://github.com/dart-lang/test_reflective_loader/compare/8593eb1..17d40bb): 17d40bb 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#54) e664092 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#55) tools (https://github.com/dart-lang/tools/compare/01c0b52..dd91cb6): dd91cb6 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#192) 603b012 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#191) typed_data (https://github.com/dart-lang/typed_data/compare/d1c15ed..0b16bd2): 0b16bd2 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#76) f869102 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#77) watcher (https://github.com/dart-lang/watcher/compare/6ad58dc..b2b278a): b2b278a 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#154) 97e9637 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#155) web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/f3ac1bf..82ac73f): 82ac73f 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#289) 3615850 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#290) webdriver (https://github.com/google/webdriver.dart/compare/eaf9c58..43ed1db): 43ed1db 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#289) 02fd658 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#288) 8828360 2023-11-01 dependabot[bot] Bump nanasess/setup-chromedriver from 2.2.0 to 2.2.1 (#287) webkit_inspection_protocol (https://github.com/google/webkit_inspection_protocol.dart/compare/82f0c1c..2c6f8b6): 2c6f8b6 2023-11-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.1 (#114) d4e4d55 2023-11-01 dependabot[bot] Bump nanasess/setup-chromedriver from 2.2.0 to 2.2.1 (#115) yaml (https://github.com/dart-lang/yaml/compare/9f0d649..98a3aab): 98a3aab 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#154) b63372b 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#155) yaml_edit (https://github.com/dart-lang/yaml_edit/compare/a7e7fba..9b9d33c): 9b9d33c 2023-11-01 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#61) b71c2e8 2023-11-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#60) Change-Id: I8b663f536d4e80728c6570372d886edfef227cf1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333059 Auto-Submit: Devon Carew <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
Dart should support generic methods/functions, similar to Java:
class Foo<E> {
E _item;
/* ... */
<T> T transform(T fn(E)) {
return fn(_item);
}
}
Currently this is supported only by omitting the type information. Additionally, some core Dart code includes the <T> annotation within comments: /<T>/. In order for proper tool/IDE support, Dart should support explicitly declaring generic types for a method.
The text was updated successfully, but these errors were encountered: