Commit Graph

679 Commits

Author SHA1 Message Date
Alexander Markov 6239c434fb [vm,cfe] Avoid elimination of 'x as Function' type casts
Elimination of redundant type cast 'x as Function' where x is
a function type (such as 'void Function(int)') is not correct because
it changes semantics of a function call if such expression is
used as a receiver.

"Function" static type of receiver allows arbitrary function calls,
while known function type of the receiver means the call doesn't
need to check parameter types. Static type of receiver is currently
not stored in kernel AST but calculated from the receiver node,
so replacing 'x as Function' with 'x' changes static type of
the receiver from "Function" to function type.

TEST=tests/language/regress/regress45428_test.dart
Fixes https://github.com/dart-lang/sdk/issues/45428

Change-Id: If7148450526703daa63a442adf67a9e7a2dcea54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193524
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-03-31 15:57:29 +00:00
Clement Skau 2236883ff2 [SDK] Removes non-exiting tests from .status
TEST=Tested all configurations.

Change-Id: Iec00d7e6ea56221ffebcf044de22647907f598f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182500
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-02-04 06:46:13 +00:00
Riley Porter cfa35be6f0 [package:js] Added checks for external non-JS members.
Adds static errors in web backends requiring external members to be
annotated with @JS(). Members can be annotated directly, or on the
enclosing class or library.

Also removes duplicate checks in dart2js for non-native external
members that are now covered by the checks on external @JS members.

Change-Id: I2b17456f8f546f80f1ea6a817360c7f4c40f9640
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180442
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-02-03 02:14:18 +00:00
Mayank Patke ed441e48d0 Update all Slow tests to be Slow, Pass.
Change-Id: I610b272355b045eab80cf941210774fb12d775eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134103
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-02-01 00:17:42 +00:00
Robert Nystrom fc1b1ecc71 Move files under language_2 into subdirectories.
Change-Id: Idbcc965a27e9ffeedf5e0a1068b019de4193070f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127745
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-12-11 19:18:00 +00:00
Karl Klose 60afc24502 [infra] Convert some multi-tests to the new static error framework
This is the result of running the tool from
https://dart-review.googlesource.com/c/sdk/+/124128 on the
language_2 tests that contain only static multi-test annotations.

Some of the results needed manual editing and in these cases I have
also changed the formatting of the tests.

Change-Id: I4ddd16a2c5d8576adccb0a740cb1d4aabbc001b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126161
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-12-04 13:06:58 +00:00
Karl Klose 9203453183 [infra] Remove non-essential test expectations with comments from dart2js status files
Change-Id: I55d13632e701f8c5627e418faaee71a09e48fe57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114851
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-09-24 06:44:11 +00:00
Mayank Patke 9385a879e5 Status file cleanup.
Change-Id: Icd0ee8b790ca2f94a47190765f9d6d8da9e0039e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117216
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-09-16 23:32:56 +00:00
Mayank Patke 035c428b31 Delete language_2/config_import_test.
Change-Id: I346b98a07379250342be889b023c6511543d83cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117215
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-09-16 22:40:51 +00:00
Mayank Patke 9f778d69f4 Fix language_2/external_test.
Change-Id: Ie54433c28619a4786ae0d67b1358cdbc91f8ffab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116890
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-09-12 23:51:57 +00:00
Mayank Patke 438c595950 Fix language_2/regress_30339_test
Change-Id: Ic0aa807c53b0334096633b0c0952efb68d0231f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116086
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Mayank Patke <fishythefish@google.com>
2019-09-09 18:57:36 +00:00
Karl Klose 1f17242a4f [infra] Remove non-essential test expectations from dart2js status files
Change-Id: Ie6ead34c5628cd63f6eeb363585932c4f15f33a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114062
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2019-08-26 11:55:25 +00:00
William Hesse f771a1f978 Skip deep constant nesting test on Windows dart2js. It crashes infrastructure.
Bug: https://github.com/dart-lang/sdk/issues/37631

These tests cause the dart2js batch mode compiler process
to resist termination somehow on Windows, which locks the dart.exe executable
and prevents sharding task cleanup.

Change-Id: Ica19e9d262f0b5b97c263205ba6fac030a3bedb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110444
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-07-25 17:17:45 +00:00
Stephen Adams 262e4c4b09 Remove canonicalization_hashing entries from language_2_dart2js.status
We only add new entries for Skip and Slow tests.

TBR=rmacnak@google.com

Change-Id: I83fe176ee6ff0e9624cf1092aed9a45f41b970d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110124
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-23 18:23:26 +00:00
Ryan Macnak 60a952e261 [vm] Avoid superlinear time canonicalizing deep constants.
Bug: https://github.com/dart-lang/sdk/issues/37523
Change-Id: Ia3c2514891e2e3f07d1b3266b019b142413918d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109318
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-07-22 22:20:33 +00:00
Stephen Adams fab9b9f71f [gardening] Move language_2/conditional_rewrite_test
Change-Id: I878230e5ed311d5d51b15c48c9fb5dca447e0ef0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108905
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-15 22:04:16 +00:00
Stephen Adams e4eea58ac9 [gardening] Update language_2/constructor12_test for strong checking
Change-Id: I1f0f121af9d22ccb2345c8da9070d352ade742f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108907
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-12 14:46:13 +00:00
Stephen Adams d1bd3a2f43 [gardening] Fix language_2/generic_instanceof2_test
Change-Id: Ida4afe8488a6c58ebfedde901ae293465a320714
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108741
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-11 18:40:48 +00:00
Stephen Adams ed764e5688 [gardening] Delete legacy parser_quirks_test
This is a test of keep-on-truckin' behaviour that is now a static
error.

Should we delete it?

Change-Id: Ia8702f46d8d343941ed002f42e0a217485e53fcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108761
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-11 17:45:48 +00:00
Vyacheslav Egorov 5479175012 Remove incorrect test.
Symbol constructor can't be used to create symbols for private names.

Closes https://github.com/dart-lang/sdk/issues/34377
Closes https://github.com/dart-lang/sdk/issues/30848
https://github.com/dart-lang/sdk/issues/36433
https://github.com/dart-lang/sdk/issues/34904

Change-Id: Ibe551c43a9209e1f483cea8178665890d52799aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108416
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-07-09 17:32:29 +00:00
Stephen Adams f0d6f119de Make nested_generic_closure_test work for dart2js
Change-Id: I07fa89b184cd542ebd028dbf70279ee6d64cd1cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107834
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-07-05 21:05:07 +00:00
Stephen Adams 0272c1d863 Split language_2/truncdiv_test
Move zero case out to increase coverage of non-zero cases.

Change-Id: Iaa3a1dbe1fc952bcccb16dca2f6543a9d367d61c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107826
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Stephen Adams <sra@google.com>
2019-07-04 07:58:05 +00:00
Stephen Adams 738d9f9666 Avoid non-web integer literal in language2/list_test
Change-Id: I926dc7b9e9eabd098c4561ea95e1e3568522902f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107922
Commit-Queue: Stephen Adams <sra@google.com>
Auto-Submit: Stephen Adams <sra@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-07-04 01:01:26 +00:00
Stephen Adams 1f02c10b9a Update language_2/const_map4_test for type inference
Change-Id: Id81d974b0889e7c469ed40c85955f9b18265c634
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107927
Auto-Submit: Stephen Adams <sra@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-02 19:23:18 +00:00
Stephen Adams 822de210b5 fix branch_canonicalization_test
Change-Id: Icd26e9edf3dbf513c614743a97c696ed88df00db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107570
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-07-02 06:15:02 +00:00
Stephen Adams 0f20911022 Improve type_literal_test
- Fix expectations for dart2js generic function types
- Split out Type canonicalization tests
- Do some partial checking for dart2js minification

Change-Id: Ifb6e38c1138311baf1a9852286e208c59aaa03fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107686
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-06-29 06:36:36 +00:00
Nate Bosch 2b56c2c58a Normalize status files
Run `pkg/status_file/bin/normalize.dart` across all status files.

This should solve most presubmit warnings about "existing and possibly
new status file issues".

There are remaining issues in pkg/front_end/testcases/strong.status and
pkg/front_end/testcases/text_serialization.status which will need to be
fixed manually.

Change-Id: Iceae8992c4907442481590d75c1b0a84ce29521b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106726
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
2019-06-19 23:04:01 +00:00
Nicholas Shahan 86c7165969 [tests] Avoid use of $strong because it is always true now
* Remove all `&&  $strong` clauses.
* Delete all sections that include a `&& !$strong` clause.

Change-Id: Idd32cf5623793e3f98e3e998025bac079d88e2f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102223
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2019-05-16 17:41:27 +00:00
Mayank Patke 11a3dd7332 Split up language_2/control_flow_collections/for_test.
This helps triage/resolve various issues in testRuntimeErrors:
* for_non_bool_condition_test isolates the code causing a crash on the
dart2js-production-linux-d8 configuration. (See
https://github.com/dart-lang/sdk/issues/36442 and the status file.)
* for_null_condition_test will be an approved failure for all dart2js
configurations due to https://github.com/dart-lang/sdk/issues/36446.
* for_runtime_error_test contains all the remaining expected type
errors. On the dart2js-production-linux-d8 configuration (which runs
with -O3), we assume no type errors exist - even ones guarded by
Expect.throwsTypeError - so the optimized code produces runtime errors
instead. See https://dart-review.googlesource.com/c/sdk/+/97820 for a
similar discussion.
* for_test contains the remaining tests, which are valid on all dart2js
configurations.

Change-Id: Ifef4f7d2e27e2731cdd4a3fec03754ea63b6328d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98606
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-04-03 19:40:32 +00:00
Vijay Menon fad85a6bfa Broken test fixes
These tests break on all backends.  It looks like the original intent was to run to completion.

Change-Id: I895638c522285f280cbb608c82a8a496bfd11d72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98302
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-04-03 13:12:23 +00:00
Mayank Patke 7f09c40db4 Add builder tag to dart2js-production-*-d8 and mark
language_2/control_flow_collections/for_test as Crash on
dart2js-production-linux-d8.

Change-Id: I672daf323a908f7f333fed71c96525dde6f68d91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98504
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-04-03 04:05:10 +00:00
Nicholas Shahan 2ee8bb87e4 Remove control flow collections test skips for all platforms
Issue: #36005
Change-Id: Ibbc1f22c8e4dad9b5a72f97001638772622b74ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98430
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2019-04-02 19:17:47 +00:00
Erik Ernst 69790e7eb4 Updated Dart.g, tests & status files to support ui-as-code collections
Change-Id: I9ba3aa4e3ebaedee3a2cd20ccdcc533af96b9bda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98018
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2019-03-29 13:33:52 +00:00
Kevin Millikin c9e9b76d4d Skip control-flow-collections tests on all runtimes
This feature is under development in the front end.  Testing it on the
runtimes leads to numerous spurious status changes.  Skip the tests
for now.  The intent is that when a backend change causes a test to
start passing, then that test will be un-skipped.

Change-Id: I6c8c1f45315607039240c3edc61ba8340ae9cda0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96902
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-03-14 13:09:07 +00:00
William Hesse a533753bec Remove --fast-startup flag support from testing scripts and status files
Change-Id: Icfb4aa228c0f13bf9fce25aeb7bacbf1e38497ee
Reviewed-on: https://dart-review.googlesource.com/c/89582
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-01-16 11:32:44 +00:00
Sigmund Cherem e636e1fa6f Accept experimental flags in dart2js and enable set-literal tests, now supported
once we accept the flag.

Note: 3 tests are missing compile-time errors from the CFE. This is a known CFE
issue, we need to mark the tests as failng using the new workflow before we land
the CL.
Change-Id: I0eaf6c1d7e903e035c83d3338054a8f92d2d9296
Reviewed-on: https://dart-review.googlesource.com/c/88763
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-01-11 19:32:46 +00:00
Dmitry Stefantsov e98701ea33 [fasta] Allow const constructors in mixin applications
Closes #33644, closes #33645, closes #32223.

Bug: http://dartbug.com/33644
Bug: http://dartbug.com/33645
Bug: http://dartbug.com/32223
Change-Id: Ia30efb8f450e62bfeb65c8b7fd7e23871ef0e87e
Reviewed-on: https://dart-review.googlesource.com/c/68368
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-12-14 12:37:30 +00:00
Lasse Reichstein Holst Nielsen a957c4351a Add more tests for async*/await-for operations.
Change-Id: Icadb9edfe2ef40aff3808295685f961897d63c9a
Reviewed-on: https://dart-review.googlesource.com/c/86181
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-12-10 14:38:34 +00:00
William Hesse c71a5279c5 Revert "Add more tests for async*/await-for operations."
This reverts commit a0d576e6cd.

Reason for revert: Turned many buildbot builders red. Use the "Choose tryjobs" button to run more configurations on this type of commit.  Use the "tools/bots/approve_results.dart" tool to update expectations for builders running the new workflow

Original change's description:
> Add more tests for async*/await-for operations.
> 
> Change-Id: I2c8ffb8a6738b8dee43cfdf85be0c54d2735b6cc
> Reviewed-on: https://dart-review.googlesource.com/c/85391
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=lrn@google.com,leafp@google.com

Change-Id: I81830c3fc565b62e98538feba9bd64c6dd11dd51
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/86023
Reviewed-by: William Hesse <whesse@google.com>
2018-12-04 20:09:46 +00:00
Lasse Reichstein Holst Nielsen a0d576e6cd Add more tests for async*/await-for operations.
Change-Id: I2c8ffb8a6738b8dee43cfdf85be0c54d2735b6cc
Reviewed-on: https://dart-review.googlesource.com/c/85391
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-12-04 13:58:03 +00:00
Sigmund Cherem b484aada21 Remove library-root option - replace it with a libraries-spec option instead
Change-Id: Ie1df52cdaa7ab4381a4c1b94c61a1210f0f31b5f
Reviewed-on: https://dart-review.googlesource.com/c/83641
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-09 22:40:28 +00:00
Lasse R.H. Nielsen 4f5bc1ea22 Add test for constant type literals being valid in switch cases and constant maps.
Implementations already allow type constants, some just do not have the correct semantics.

See: https://dart-review.googlesource.com/c/sdk/+/81274/2..4
Change-Id: I2f535e4609b9d3b002ba33f579f3b840d70e0fdb
Reviewed-on: https://dart-review.googlesource.com/c/82981
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-11-09 10:22:00 +00:00
Lasse R.H. Nielsen 095d694add Add tests for set literals.
Change-Id: Ia5e576e801bd4c9dd3fabca5f11c8e4f86e98803
Reviewed-on: https://dart-review.googlesource.com/c/82840
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-11-06 13:47:35 +00:00
Erik Ernst 4cf179bcf1 Corrected outdated tests string_split_test and string_supertype_checked
Change-Id: I9ecb49d921b3df1bb5cda63b65e6ae07e618110d
Reviewed-on: https://dart-review.googlesource.com/c/82721
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2018-11-05 14:21:19 +00:00
Samir Jindel e23acaaf90 [vm/aot] Fix obfuscation.
Test Plan:

Make vm-kernel-precomp-obfuscate-linux-release-x64-try green, ensuring status file changes
reflect design gaps and not bugs.

Tested locally that obfuscated Flutter Gallery runs.

Change-Id: Ifcdc334de58f43c310e15b58dbcf6fe1597206f2
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-obfuscate-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/81009
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-10-26 13:00:33 +00:00
Lasse R.H. Nielsen 03765ed6ec Update old mixin tests. Remove the --super-mixins flag from the tests.
Bug: http://dartbug.com/34781
Change-Id: Ib07e1927e7de35ff0c48514b9e89da65a5f192dd
Reviewed-on: https://dart-review.googlesource.com/c/79700
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-10-23 08:35:49 +00:00
Dmitry Stefantsov bf270577cc [fasta] Report errors on generic function types in type arguments
Fixes #30931

Bug: http://dartbug.com/30931
Change-Id: Ia44f8ff95e85547997912c7dd1403ae1f77aec33
Reviewed-on: https://dart-review.googlesource.com/c/79720
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-10-15 13:48:03 +00:00
Johnni Winther dc9d6785de Report compile-time errors on invalid switch cases
This is a temporary fix for issue 32557 until CFE handles it.

Change-Id: I4f0cfa5a98af6b25536f0c8e0a257940f8ce708b
Reviewed-on: https://dart-review.googlesource.com/c/79561
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2018-10-12 17:52:12 +00:00
Daniel Hillerström eee8787a8d Generate noSuchMethod forwarders for private members inherited from a
class in a foreign library.

This CL changes the predicate which is used to decide whether to
generate noSuchMethod forwarders such that it returns true whenever
the class in question has a user defined no such method or the
enclosing library of the class is different from that of the member.

Closes https://github.com/dart-lang/sdk/issues/33727

Change-Id: I0ffcbb8c8bdd69e4261bcefce2251d31babc19cf
Reviewed-on: https://dart-review.googlesource.com/c/79209
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-10-12 13:58:10 +00:00
Sigmund Cherem 0cdd5b9ff3 Raise warning to error: duplicate key in a const map is now an error in Dart.
Eventually the plan is to handle this in the CFE when it performs
constant-evaluation, but for now we can check this in dart2js
(see https://github.com/dart-lang/sdk/issues/32983)

Change-Id: Ic2e5cfd96961094e634da201c55f82398c060aca
Reviewed-on: https://dart-review.googlesource.com/c/79421
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-10-12 00:18:34 +00:00