Commit graph

305 commits

Author SHA1 Message Date
pq 2fbb267460 Revert "Migrate test block 152 to Dart 2.0." [TBR].
This reverts commit 9744f5d212.

Change-Id: I1299f0e9ea14c776c315dd8439bd9ab255d9060b
Reviewed-on: https://dart-review.googlesource.com/5001
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2017-09-11 18:24:16 +00:00
pq 9744f5d212 Migrate test block 152 to Dart 2.0.
Change-Id: Iad60c7a650595703b0a0109d15d8971a4c209d84
Reviewed-on: https://dart-review.googlesource.com/3701
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-09-11 17:11:17 +00:00
Jennifer Messerly 719e854ce4 fix regress_29481_test status for analyzer
(it's passing now)

Change-Id: I7c0b242c3569dd21b1c8c3c66257fe5874c135c0
Reviewed-on: https://dart-review.googlesource.com/3344
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2017-09-05 23:21:32 +00:00
Janice Collins 3a8a1ca54c Migrate test block 113 to Dart 2.0.
Request particular attention to generic_creation_test and generic_field_mixin6_test, but all of the following required tweaks
to the status files to pass tests:

generic_closure_test
generic_function_bounds_test
generic_function_dcall_test
generic_function_typedef_test
generic_field_mixin6_test
generalized_void_syntax_test
generic_functions_test

BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/3008573002 .
2017-08-30 08:50:16 -07:00
Janice Collins fe7c2acd4e Migrate block 163 to Dart 2.0.
Interesting tests requiring status file or other changes:

type_variable_promotion_test
type_variable_scope_test
type_variable_static_context_negative_test - changed from negative to compile-time error
unresolved_top_level_method_negative_test - changed from negative to compile-time error
unary_plus_negative_test
unhandled_exception_negative_test
unbound_getter_test
unresolved_in_factory_negative_test -
unresolved_top_level_var_negative_test - changed from negative to compile-time error
unresolved_top_level_method_negative_test - changed from negative to compile-time error
vm/async_await_catch_stacktrace_test

BUG=
R=lrn@google.com

Review-Url: https://codereview.chromium.org/3008723002 .
2017-08-30 08:05:12 -07:00
Bob Nystrom 46320c5208 Migrate block 115.
Interesting changes:

- A static getter colliding with an inherited non-static setter is a
  compile error, not a type warning.

- Trying to call a setter on what is only a getter is a compile error
  with no runtime behavior.

- Add support to test.dart for negative tests in DDC.

BUG=
R=jcollins@google.com

Review-Url: https://codereview.chromium.org/3005643002 .
2017-08-28 16:17:28 -07:00
Bob Nystrom 615be6451e Migrate block 114 (and some of 113).
generic_instanceof ... getter_closure_execution_order_test.

The main interesting one is generic_methods_type_expression_test. It
was testing old Dart 1.0-specific behavior and needed a lot of changes.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/3001803002 .
2017-08-24 10:52:29 -07:00
Morten Krogh-Jespersen 3803057169 Migrating a block of dart 2:
./language[_strong]/class_keyword_test.dart
./language[_strong]/closure_shared_state_test.dart

R=johnniwinther@google.com

NOTE: I had to bypass hooks since the analyser fails on the files that have static compile-time errors. Should I do something else?
Committed: fa59030f18
Review-Url: https://codereview.chromium.org/3001433002 .
2017-08-10 15:11:33 +02:00
Morten Krogh-Jespersen f0e8bb629b Revert "Migrating a block of dart 2:"
This reverts commit fa59030f18.

TBR=sortie@google.com

Review-Url: https://codereview.chromium.org/2997723002 .
2017-08-10 14:51:18 +02:00
Morten Krogh-jespersen fa59030f18 Migrating a block of dart 2:
./language[_strong]/class_keyword_test.dart
./language[_strong]/closure_shared_state_test.dart

R=johnniwinther@google.com

NOTE: I had to bypass hooks since the analyser fails on the files that have static compile-time errors. Should I do something else?
Review-Url: https://codereview.chromium.org/3001433002 .
2017-08-10 14:43:05 +02:00
Bob Nystrom 243d1c74eb Migrate language block 46 - canonical_const ... char_escape.
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2996533003 .
2017-08-04 16:52:13 -07:00
Bob Nystrom 3c7f9852a5 Migrate block 43.
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2990933002 .
2017-08-01 16:58:52 -07:00
Bob Nystrom f32d1b2bcd Migrate block 37, language/arithmetic2 ... /async_await_syntax_test.
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2992003002 .
2017-07-28 11:16:23 -07:00
Erik Corry e431e93e87 Revert two Kernel changes that were causing test failures.
Example failure:
python tools/test.py -m release -c dartk --builder-tag no_ipv6 \
    language/function_type/function_type63_test

Revert "Serialize typedef parameters (including function typed ones) to Kernel and use it to resynthesize typedefs from Kernel."
This reverts commit afc392b66d.
Reverts https://codereview.chromium.org/2990783002

Revert "Add Member.documentationComment and use it to resynthesize documentation from Kernel."
This reverts commit 47ecf72272.
Reverts https://codereview.chromium.org/2990873002

Also reverts some attempts to fix test files:
302b410364
https://codereview.chromium.org/2984343002
05ccf27015
https://codereview.chromium.org/2992683002
f71dcd7834
https://codereview.chromium.org/2984363003

Also had to revert some test changes that were committed on top of a red buildbot, in order to try to get back to a place where bots were green:

23952fdf56
https://codereview.chromium.org/2990773002
557cab2a3e
https://codereview.chromium.org/2985173002

R=johnniwinther@google.com, karlklose@google.com
BUG=

Review-Url: https://codereview.chromium.org/2986093002 .
2017-07-28 14:08:23 +02:00
Bob Nystrom 23952fdf56 Migrate language/arithmetic2_test ... language/async_await_syntax_test.
R=sra@google.com

Review-Url: https://codereview.chromium.org/2990773002 .
2017-07-27 16:13:47 -07:00
Erik Ernst 9336e199fd Re-land of CL 2990703002, adding fixes to analyzer_test and error_test.
This CL is identical to the reverted CL 2990703002 which implements
syntactic support for generalized void in the analyzer, plus two bug
fixes in pkg/analyzer/test/generated/parser_test.dart and
pkg/analyzer_cli/test/error_test.dart. In the former, a test on parsing
`void,` was changed to expect an error: _isTypeIdentifier on a lone
`void` will no longer return true, which is necessary because `void`
can now be used as a type annotation alone. Another test on `void x`
was added, which produces the behavior previously seen for `void,`.
In error_test, the error which is used throughout was changed from
`void foo;` to `var int foo;` (because the former is no longer an
error).

Review-Url: https://codereview.chromium.org/2992623002 .
2017-07-27 12:39:19 +02:00
Erik Ernst 2e73ce1187 Revert "Implemented support for generalized void in analyzer."
This reverts commit 1d44f5296a,
because it causes failures for the analyzer in parser_test, error_test.

Review-Url: https://codereview.chromium.org/2990723002 .
2017-07-26 18:18:04 +02:00
Erik Ernst 1d44f5296a Implemented support for generalized void in analyzer.
Changed the analyzer parser to accept usages of `void` which were
previously rejected as syntax errors: `void` can now be the type
annotation for a variable or parameter, and it can be an actual type
argument.

Removed affected error codes like VOID_PARAMETER, VOID_VARIABLE,
VOID_RETURN_FOR_GETTER and associated declarations (like checking
functions), and adjusted test cases to expect success rather than
compile time errors.

Adjusted generalized_void_syntax_test.dart (it had real errors like
`final` variables with no initializer etc. that were not detected
when tools would just reject the file as syntactically wrong).

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2990703002 .
2017-07-26 17:45:13 +02:00
Bob Nystrom 0947675d6d Migrate the language tests up to arithmetic_test.
This technically steals a few tests from the previous batch that spans
corelib and language, but I wanted to start from the top of the language
tests.

Removed application_test and application_negative_test because they are
useless and the latter has never actually worked correctly since the day
it was transliterated from the long-defunct application file syntax.

R=bkonyi@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/2984443003 .
2017-07-19 20:30:21 -07:00
Erik Ernst 182c4d5923 Added test using void in new positions.
This is the first step of addressing issue 30176.
The test contains syntax errors according to all tools, and status
files have been adjusted accordingly.

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2980293002 .
2017-07-18 13:27:33 +02:00
Lasse R.H. Nielsen d7653c1f88 More status file updates
Review-Url: https://codereview.chromium.org/2978493002 .
2017-07-10 16:22:40 +02:00
Lasse R.H. Nielsen 609d26a227 Add assert-in-initializer-list to formal specification.
Add tests for new syntax.
Not dart-formatted yet since the formatter doesn't accept the new syntax.

R=eernst@google.com, floitsch@google.com

Review-Url: https://codereview.chromium.org/2962153002 .
2017-07-10 13:59:38 +02:00
danrubel 4da09b06d0 enable fasta scanner in analyzer by default
* update test because fasta scanner correctly warns on 1.e+2
* fasta scanner correctly produces compile time error
    see dartbug.com/28664
    fix dartbug.com/28680
* update fasta AsciiControlCharacter error code
* enable fasta scanner in analyzer by default

R=ahe@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2967363003 .
2017-07-06 13:35:50 -04:00
Brian Wilkerson 563720617c Allow trailing comma in assert
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2961063002 .
2017-06-28 10:46:44 -07:00
Ben Konyi 143baba8fc Reintroducing parser changes to cause compile-time errors when trying to reinitialize a final field. Updated status files to hopefully address the test failures. Issue 29658.
This reverts commit 12e93cc41e.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2953843003 .
2017-06-22 13:48:57 -07:00
Ryan Macnak 095ff155fd VM: Allow trailing comma in assert statements.
Issue #29959

R=regis@google.com

Review-Url: https://codereview.chromium.org/2946173002 .
2017-06-21 09:08:16 -07:00
Alan Knight 12e93cc41e Revert "Updated parser to produce error when trying to reinitialize final variables in class constructors. Fixes issue #29658."
This reverts commit 9755a98b00.

BUG=

Review-Url: https://codereview.chromium.org/2949943002 .
2017-06-20 15:25:55 -07:00
Ben Konyi 9755a98b00 Updated parser to produce error when trying to reinitialize final variables in class constructors. Fixes issue #29658.
BUG=
R=zra@google.com

Example:
Foo {
  final int x = 10;
  Foo(this.x); // Error
  Foo.named() : x = 42; // Error
}
Review-Url: https://codereview.chromium.org/2947043002 .
2017-06-20 14:40:36 -07:00
Ben Konyi a4a227e375 Revert "Updated parser to produce error when trying to reinitialize final variables in class constructors. Fixes issue #29658."
This reverts commit b5cff3f68f.

TBR=zra@google.com

Review-Url: https://codereview.chromium.org/2944223002 .
2017-06-19 17:23:01 -07:00
Ben Konyi 0555d5e176 More status file updates to fix bot failures caused by parser change.
BUG=

Review-Url: https://codereview.chromium.org/2943413002 .
2017-06-19 16:24:30 -07:00
Ben Konyi 510c3f02ba Fixed language_analyzer2.status file to skip test until issue 29657 is resolved.
BUG=

Review-Url: https://codereview.chromium.org/2950593002 .
2017-06-19 13:36:18 -07:00
Ben Konyi 2cdfc0cdab Updated co19 status file to skip initializing_formals_execution_t02 until it is updated to expect a compilation error when trying to reinitialize a final field: https://github.com/dart-lang/co19/issues/114.
BUG=

Review-Url: https://codereview.chromium.org/2944073002 .
2017-06-19 13:14:03 -07:00
Ben Konyi b5cff3f68f Updated parser to produce error when trying to reinitialize final variables in class constructors. Fixes issue #29658.
BUG=
R=asiva@google.com

Example:
Foo {
  final int x = 10;
  Foo(this.x); // Error
  Foo.named() : x = 42; // Error
}
Review-Url: https://codereview.chromium.org/2939553005 .
2017-06-19 12:07:37 -07:00
Peter von der Ahé d920dacad8 Fix typo in test.
Closes https://github.com/dart-lang/sdk/issues/11545

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2939683003 .
2017-06-13 15:58:27 +02:00
Régis Crelier f0faae52bf Fix VM to accept literal function type as type bound (fixes #29481).
Add regression test.
Mark status files for failing dart2js and analyzer (filed new issues).

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2916453003 .
2017-05-30 17:26:35 -07:00
Régis Crelier b7ebbf8c77 Allow a function named 'get' to be generic (fixes #29746).
Add regression test.
Mark status files for failing dartk, dart2js, and analyzer.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2911333002 .
2017-05-30 15:31:04 -07:00
Paul Berry 11fbbea7a7 Create language test that exercises bug #29709.
R=ahe@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2903033002 .
2017-05-24 11:20:07 -07:00
William Hesse 2a0dd9d43c Update status for passing analyzer test.
This test started passing with
1cfb242321
https://codereview.chromium.org/2901853002

Also removed comments in status file, and placed issue number comments
on the test status lines.

BUG=dartbug.com/14879
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2902943003 .
2017-05-24 13:52:41 +02:00
Johnni Winther db289eed9e Update status for multiline tests.
Review-Url: https://codereview.chromium.org/2869743002 .
2017-05-08 13:37:27 +02:00
Régis Crelier 4c0757521d Update status files for dart2js and analyzer (2 issues filed).
Review-Url: https://codereview.chromium.org/2829283002 .
2017-04-21 10:15:10 -07:00
Konstantin Shcheglov 62320cc838 Issue 25558. Report an error, but don't crash when AST it too deep.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25558

Review-Url: https://codereview.chromium.org/2823993002 .
2017-04-17 14:46:55 -07:00
Konstantin Shcheglov 54f845cfd2 Support for generic function as type arguments in DeclarationResolver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2814223002 .
2017-04-12 13:47:23 -07:00
Regis Crelier 25dbc9b28a Fix look-ahead parsing code in the VM (fixes #29243).
Add regression test.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2812323002 .
2017-04-12 11:04:21 -07:00
Brian Wilkerson ccf768144f More generic function type cases working
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2770143002 .
2017-03-24 08:08:23 -07:00
Regis Crelier 063dd6d03f Make sure the signature of the call method is finalized before involving it
in bound checkings of its owner class (fixes #29025).
Add regression test and mark as failing for the analyzer (issue filed).
Add missing trail argument in 2 locations (not related to the fixed issue).
Cleanup: Remove ClassFinalizer::kCanonicalizeWellFormed which is not treated
differently than ClassFinalizer::kCanonicalize anymore after earlier changes in
the spec on how to handle malformed types.

R=asiva@google.com, hausner@google.com

Review-Url: https://codereview.chromium.org/2755723003 .
2017-03-15 16:44:33 -07:00
Florian Loitsch 979183decf Add support for the new function-type syntax.
Fixes #27967
BUG= http://dartbug.com/27967
R=ahe@google.com, johnniwinther@google.com, paulberry@google.com, sigmund@google.com

Committed: 85227ba8a6
Reverted: f5fc210f4f
Committed: e4999a6310
Reverted: c64c351539
Committed: c289af39c3
Reverted: c66479f407
Review-Url: https://codereview.chromium.org/2567133002 .
2017-02-23 13:36:28 +01:00
Florian Loitsch c66479f407 Revert "Add support for the new function-type syntax."
This reverts commit c289af39c3.

BUG=

Review-Url: https://codereview.chromium.org/2710973002 .
2017-02-22 17:19:35 +01:00
Florian Loitsch c289af39c3 Add support for the new function-type syntax.
Fixes #27967
BUG= http://dartbug.com/27967
R=ahe@google.com, johnniwinther@google.com, sigmund@google.com

Committed: 85227ba8a6

Reverted: f5fc210f4f

Committed: e4999a6310

Reverted: c64c351539
Review-Url: https://codereview.chromium.org/2567133002 .
2017-02-22 16:53:49 +01:00
William Hesse 25e97c6082 Replace bad_raw_string_negative_test with a multitest
BUG=https://github.com/dart-lang/sdk/issues/28664
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2687533003 .
2017-02-07 23:55:34 +01:00
Brian Wilkerson 2ee2fe9b5c [Gardening] Disable running strong-mode analyzer tests in code that is not strong mode clean
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2679553003 .
2017-02-06 13:26:39 -08:00