-
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
invalid co19 test - need to change or remove co19 test #244
Comments
This comment was originally written by ief...@unipro.ru This test is marked as @compile-error, so this code is expected to be rejected. Description is probably misleading, it means "Checks that generative constructor of class C can not specify C as a return type". |
This comment was originally written by fab...@google.com I imagine it cant specify "C" or any other type. in other words, it cant specify any return type. |
This comment was originally written by ief...@unipro.ru Sure, that is what is written under @assertion tag. The test performs a single check and this is documented in the description. More checks will be provided in language spec test suite. LangGuideTests are just samples. |
This comment was originally written by fab...@google.com just to be clear. what you mentioned before "Checks that generative constructor of class C can not specify C as a return type" and "generative constructors cannot have return types" are quite different things. neither the current description nor the assert makes this clear. moreover, if the test was only testing the existence of return type, it would not need a return statement in the constructor body. I will change the test to the expected behavior. |
This comment was originally written by drfibonacci@google.com Set owner to fab...@google.com. |
This comment was originally written by fab...@google.com Set owner to @peter-ahe-google. |
This comment was originally written by ief...@unipro.ru Let me make myself clear. The assertion I took from the language guide says "A non-factory constructor doesn't have any return type (even in typed mode)" So the test tries to specify return type annotation on a constructor and awaits a compile-error. I see that return statement should be removed and description should probably be corrected. Could you guys please give me ideas for what else should be done? |
If you remove the return statement, we can close this bug. |
This comment was originally written by ief...@unipro.ru done at co19 r16 |
Thank you! Added Verified label. |
…_launcher, clock, crypto, csslib, dartdoc, html, http, http_multi_server, intl, package_config, pool, protobuf, pub_semver, source_map_stack_trace, source_maps, source_span, sse, stack_trace, stream_channel, term_glyph, test, test_descriptor, test_process, test_reflective_loader, watcher, web_socket_channel, yaml Revisions updated by `dart tools/rev_sdk_deps.dart`. bazel_worker (https://github.com/dart-lang/bazel_worker/compare/9f21e1d..b35c25e): b35c25e 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#66) benchmark_harness (https://github.com/dart-lang/benchmark_harness/compare/ee7a253..76881df): 76881df 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#80) boolean_selector (https://github.com/dart-lang/boolean_selector/compare/5082b3d..ba7d86b): ba7d86b 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#41) browser_launcher (https://github.com/dart-lang/browser_launcher/compare/2712dda..f2f01e4): f2f01e4 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#37) clock (https://github.com/dart-lang/clock/compare/8a8231f..6b8b7bf): 6b8b7bf 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#41) crypto (https://github.com/dart-lang/crypto/compare/bf0c33b..f854f2f): f854f2f 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#138) csslib (https://github.com/dart-lang/csslib/compare/34203c0..d776535): d776535 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#156) dartdoc (https://github.com/dart-lang/dartdoc/compare/ce25524..9ed196f): 9ed196f1 2023-01-03 Sam Rawlins Move many test files to test_reflective_loader (#3284) html (https://github.com/dart-lang/html/compare/28fb8b9..3dd00b0): 3dd00b0 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#193) http (https://github.com/dart-lang/http/compare/38d5dd9..d434d42): d434d42 2023-01-03 Brian Quinlan Make it possible to use a custom CronetEngine with runWithClient (#843) http_multi_server (https://github.com/dart-lang/http_multi_server/compare/e31c698..beb40a7): beb40a7 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#47) intl (https://github.com/dart-lang/intl/compare/59e7bff..c61fdd1): c61fdd1 2023-01-04 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#528) 2a5e3a2 2023-01-04 Copybara-Service Merge pull request #527 from mateendev3:patch-2 07a5847 2022-12-31 Mateen Mehmood Update date_format.dart package_config (https://github.com/dart-lang/package_config/compare/abb4aec..2e1a8ec): 2e1a8ec 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#128) pool (https://github.com/dart-lang/pool/compare/1ea5b03..713e631): 713e631 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#59) protobuf (https://github.com/dart-lang/protobuf/compare/1d1c92a..dd04535): dd04535 2023-01-04 Mahdi K. Fard Fix avoid_renaming_method_parameters linter warning. (#783) 4b1fc34 2023-01-04 Mahdi K. Fard Removes a non-existing lint rule. (#784) pub_semver (https://github.com/dart-lang/pub_semver/compare/1723111..3946e33): 3946e33 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#76) source_map_stack_trace (https://github.com/dart-lang/source_map_stack_trace/compare/8d8078f..e5f9564): e5f9564 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#31) source_maps (https://github.com/dart-lang/source_maps/compare/b031e2c..d995912): d995912 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#70) source_span (https://github.com/dart-lang/source_span/compare/d1d47e5..72d5c55): 72d5c55 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#89) sse (https://github.com/dart-lang/sse/compare/2de27fe..3c37edb): 3c37edb 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#73) stack_trace (https://github.com/dart-lang/stack_trace/compare/cf3562e..c08ee90): c08ee90 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#125) stream_channel (https://github.com/dart-lang/stream_channel/compare/9143047..0a7800a): 0a7800a 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#83) term_glyph (https://github.com/dart-lang/term_glyph/compare/822cd5b..2bf4594): 2bf4594 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#30) test (https://github.com/dart-lang/test/compare/8235a25..3415089): 34150897 2023-01-03 dependabot[bot] Bump ossf/scorecard-action from 2.0.6 to 2.1.2 (#1838) 5f01dd97 2023-01-03 dependabot[bot] Bump github/codeql-action from 1.0.26 to 2.1.37 (#1839) test_descriptor (https://github.com/dart-lang/test_descriptor/compare/13dbc20..b73c691): b73c691 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#46) test_process (https://github.com/dart-lang/test_process/compare/1774aa7..62ea2ba): 62ea2ba 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#37) test_reflective_loader (https://github.com/dart-lang/test_reflective_loader/compare/52b6753..cf58259): cf58259 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#43) watcher (https://github.com/dart-lang/watcher/compare/3259107..2e0db71): 2e0db71 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#132) web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/a90e740..ebd0fe9): ebd0fe9 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#244) yaml (https://github.com/dart-lang/yaml/compare/f699275..02be51e): 02be51e 2023-01-03 dependabot[bot] Bump actions/checkout from 3.1.0 to 3.2.0 (#133) Change-Id: I56af76e89a75b0712b290ea154f606781183bec7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278368 Auto-Submit: Devon Carew <devoncarew@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
…est, tools, webdev Revisions updated by `dart tools/rev_sdk_deps.dart`. async (https://github.com/dart-lang/async/compare/96c29d0..a506993): a506993 2023-06-01 Kevin Moore Update testing SDK in CI (#245) 9be3fc0 2023-06-01 Kevin Moore Require Dart 2.19, use latest team lints (#244) dartdoc (https://github.com/dart-lang/dartdoc/compare/39fe1a8..0c8feac): 0c8feac6 2023-06-04 Sam Rawlins Sort enum_test.dart (#3428) ffi (https://github.com/dart-lang/ffi/compare/7f4acbd..f582ca0): f582ca0 2023-05-17 Daco Harkes Rename `master` branch to `main` (#197) 604451d 2023-05-16 Devon Carew blast_repo fixes (#195) http (https://github.com/dart-lang/http/compare/8834aec..5312366): 5312366 2023-06-02 Brian Quinlan Reland "support the nsurl session web socket api" (#950) leak_tracker (https://github.com/dart-lang/leak_tracker/compare/cbbdeca..f17da61): f17da61 2023-06-02 Polina Cherkasova Add constructor for retaining path. (#72) b70e538 2023-06-01 Polina Cherkasova Fix connection issue. (#70) a80f253 2023-06-01 dependabot[bot] Bump actions/checkout from 3.3.0 to 3.5.2 (#71) lints (https://github.com/dart-lang/lints/compare/edc28ed..fc74ce0): fc74ce0 2023-06-02 Devon Carew update the readme to clarify the package's goals (#130) 4e4c18f 2023-06-02 Devon Carew mv analysis_options file (#129) mockito (https://github.com/dart-lang/mockito/compare/924f65c..cca4858): cca4858 2023-06-02 Ilya Yanok Fix the unresolved types if used as ignored type-alias arguments 8652886 2023-06-01 Googler Prepare for NamedType breaking change in the analyzer. test (https://github.com/dart-lang/test/compare/3276921..7a6c98d): 7a6c98d0 2023-06-01 Konstantin Scheglov Require analyzer 5.12.0, refactor InstanceCreationExpression type name extraction. (#2015) 23bd4159 2023-06-01 Nate Bosch Use switch expressions for switch/return pattern (#2027) 06bdbb65 2023-06-01 Nate Bosch Make State and Result enums (#2028) 11805dc5 2023-06-01 Nate Bosch Migrate to Dart 3 (#2024) tools (https://github.com/dart-lang/tools/compare/389925f..8d6e8b8): 8d6e8b8 2023-06-01 Kevin Moore unified_analytics and graphs: cleanup lints, bump pkg deps (#108) webdev (https://github.com/dart-lang/webdev/compare/f565d7f..b10d62b): b10d62b8 2023-06-02 Anna Gringauze Support using scope in evaluateInFrame (#2122) c0300ce6 2023-06-02 Elliott Brooks Included requested-by header in `ProxyServerAssetReader` (#2129) 57699563 2023-06-01 dependabot[bot] Bump actions/labeler from 4.0.3 to 4.0.4 (#2128) Change-Id: Ia6114a0cbbe789f13e2c42399f53ff0e4d29d74a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307502 Auto-Submit: Devon Carew <devoncarew@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This issue was originally filed by fab...@google.com
LangGuideTest/02_Language_Constructs/02_1_Class/02_1_Class_Construction/A02/t01
* @description Checks return type corresponding to the class for named constructor.
class C {
C C.makeC() { return this;}
}
main() {
var c = new C.makeC();
}
generative constructors cannot have return type. the test purpose is not clear. it seems that indicate that constructors cannot have return type and at the same time checks for return type as per the description.
The text was updated successfully, but these errors were encountered: