Commit graph

88 commits

Author SHA1 Message Date
Paul Berry 2b8411f626 Enable language feature inference-update-2.
This language feature allows type promotion to apply to private final
fields, e.g.:

    class C {
      final int? _x;
      C(this._x);
    }
    f(C c) {
      if (c._x != null) {
        print(c._x.abs()); // (1)
      }
    }

Previously the line marked (1) would have needed to be written
`print(c._x!.abs());`.

Note that to ensure soundness, there are certain restrictions:

- Public fields don't undergo promotion (because a public field might
  be overridden by a class in some other library).

- Non-final fields don't undergo promotion (because a non-final field
  might be modified as a side effect of code executed between the type
  test and the field's usage).

- Fields that are forwarded to `noSuchMethod` in the same library
  don't undergo promotion (because there's no guarantee that
  `noSuchMethod` will return the same value on every invocation). For
  example:

    class C {
      final int? _x;
      C(this._x);
    }
    class D implements C {
      @override
      noSuchMethod(...) => ...;
    }
    f(C c) {
      if (c._x != null) {
        print(c._x.abs()); // ERROR: `c._x` might dispatch to
                           // `D.noSuchMethod`, in which case there's
                           // no guarantee that it will return a
                           // non-null value the second time it's
                           // invoked.
      }
    }

- If two classes define fields or getters of the same name, and
  promotion is not permitted for one of them, then it isn't permitted
  for the other. This is because there might be a class in some other
  library that's a subclass of both classes, causing a reference to
  one field or getter to dispatch to the other. For example:

    class C {
      final int? _x;
      C(this._x);
    }
    class D {
      int? get _x => ...;
    }
    f(C c) {
      if (c._x != null) {
        print(c._x.abs()); // ERROR: `c._x` might dispatch to `D._x`
                           // (e.g. because some library might declare
                           // `class E extends D implements C`), in
                           // which case there's no guarantee that it
                           // will return a non-null value the second
                           // time it's invoked.
      }
    }

Change-Id: Ib9183581aa0194377e38ab70d37c3e9f0bb57a75
Bug: https://github.com/dart-lang/language/issues/2020
Tested: TAP global presubmit
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314600
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-07-28 23:56:52 +00:00
Johnni Winther 74fa24d4c0 [cfe,analyzer] Remove 'extension-types' experimental flag
This is not the flag you're looking for.

The 'extension-types' flag was used for an early experiment that is
not directly related to the Extension Types feature currently being
developed. The current feature uses the 'inline-class' flag.

Change-Id: Icbb6c3828c41e743e726161b17da4c7784a2c677
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316380
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-07-27 09:30:36 +00:00
Alexander Thomas a3d48885e7 [release] Bump version on main to 3.2
Tested: CQ
Change-Id: I16210697b47dd85aec8743b457e773b044cab81f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316200
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-07-25 15:12:49 +00:00
Chloe Stefantsova d3b2b764a1 [cfe] Remove 'value-class' experimental flag
Change-Id: I9bcb9e30732503c9da4e723ded863949f5f0f1b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315200
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-07-21 11:16:24 +00:00
Daco Harkes e1ae1b48ae [vm/ffi] dartdev CLI native-assets
This CL introduces native assets suport for `dart run` and introduces
`dart build` which is similar to `dart compile` but outputs a folder
instead to that native assets can be bundled with an executable.

Change-Id: Ib6cfb95539f0adee46c99e531e440928c3f72f2b
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267340
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-05-30 09:10:28 +00:00
Michael Thomsen 152296e642 Cleanup experiment flags formatting:
- Move down shipped 3.0 flags
- Sort all flags consistently

TEST=Manually verified

Change-Id: I21c209df4ff11322512e50a2be666293b5a9743f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302323
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2023-05-09 21:08:41 +00:00
William Hesse 7bac8ed687 [Release] Bump minor version of main to version 3.1.
Change-Id: Icf489686d790be195e37db37727782227d2f3704
TEST=Version bump autogenerated by scripts
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294600
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-04-12 16:36:20 +00:00
Lasse R.H. Nielsen 80de9162c8 Retire 2.19 experiment.
Tested: No tests. Removing functionality, all existing tests running is a success.
Change-Id: I25eb84347e1d133d465671223f4d3b037116c5e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294241
Reviewed-by: Liam Appelbe <liama@google.com>
Auto-Submit: Lasse Nielsen <lrn@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-04-12 12:46:41 +00:00
Robert Nystrom 56eaffb392 [flip-patterns] Enable "records" and "patterns" experiment flags.
This turns on the flags for these two language features and makes
them generally accessible.

Doing so causes a number of tests to fail, but the failures are
approved and there are filed issues for them. Most of the
failures are minor or only affect code using the new language
features.

This CL:

- Enables the features in experimental_features.yaml.
- Re-generates all of the various files generated from that.
- Makes some analyzer and front end changes that this CL
  inherited from Paul's original CL flipping all of the 3.0
  feature flags. I don't know what these changes are about, but
  I assume they are necessary.
- Pins a couple of tests to 2.19 since they deliberately test
  behavior that is specific to 2.19. (For most test changes, I've
  landed them separately, but there are a couple of stragglers
  in this CL.)

This doesn't enable "class-modifiers" or "sealed-types" and doesn't
include the core lib changes related to those.

TEST=On bots

Change-Id: Id387753772286a958e20a3589a6e983995f2e4a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286344
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-03-10 20:02:23 +00:00
Jake Macdonald 737b6f7356 [flip-modifiers]: flip the flags for sealed classes and class modifiers
Includes several updates to tests that needed to land with this flip, as well as some other tests that needed to be updated and could land separately, but are being included here to expedite things.

Removes some unnecessary experimental release versions, as well as bringing up to date the generated files, which were previously out of sync with the yaml file.

TEST=bots

Change-Id: I71a86d7a86190069b504bd27d687f62b97a7251e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285080
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-03-10 05:27:57 +00:00
Lasse R.H. Nielsen cc736dfb65 [flip-modifiers]: Reapply "Enforce current library restrictions."
This reapplies commit 0c05e33836
and reverts the revert 029e0cec71.

Tested: Added few new tests, updated existing. Mainly regression testing.
CoreLibraryReviewExempt: Reviewed in original CL.
Change-Id: Ifcc79ce2f9375f607722643a04957b0961e6c295
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284304
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-03 09:37:38 +00:00
Ilya Yanok 029e0cec71 Revert "Enforce current library restrictions."
This reverts commit 0c05e33836.

Reason for revert: breaks ~10% of G3 smoke suite.

Original change's description:
> Enforce current library restrictions.
>
> Mark all currently unimplementable types as `final`, or `sealed` for `num` and `final` for `Function`.
> Mark all current classes intended as mixins as `mixin class`.
>
> More additions and cleanup will follow,
> but this change should make everything keep working as today
> if we flip the switch.
>
> TEST= No new tests, very little actual change, covered by existing tests with few changes. Will add more tests when adding more modifiers.
>
> Change-Id: I40e724f823e7f88cdef186d2f73874df256e2f43
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281683
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Kallen Tu <kallentu@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ib0cb5b7ec1a8c392bbf9bf4af8dc3efc0b27991d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284187
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Ilya Yanok <yanok@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-02-20 15:29:41 +00:00
Lasse R.H. Nielsen 0c05e33836 Enforce current library restrictions.
Mark all currently unimplementable types as `final`, or `sealed` for `num` and `final` for `Function`.
Mark all current classes intended as mixins as `mixin class`.

More additions and cleanup will follow,
but this change should make everything keep working as today
if we flip the switch.

TEST= No new tests, very little actual change, covered by existing tests with few changes. Will add more tests when adding more modifiers.

Change-Id: I40e724f823e7f88cdef186d2f73874df256e2f43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281683
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
2023-02-18 12:37:40 +00:00
Ahmed Ashour 155398b6dd Enhance documentation in tools/experimental_features.yaml
Fixes #50952

Change-Id: I6dda188a25678b61007b76bbe6cc4c72307dea97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278512
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-01-11 02:49:10 +00:00
Kallen Tu 9c8749db96 [analyzer/cfe] Add an experiment flag for class modifiers.
Flag for 'base', 'final', 'interface' and mixin classes.

Change-Id: I51037678826527a36b6dae731f43c8f36fead215
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276765
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-12-21 21:44:32 +00:00
Lasse R.H. Nielsen 2274ce9b05 Retire experiment flags introduced in 2.18.
Change-Id: I660bbf09c758f88589a10b0334ddd34c0620460d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275244
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2022-12-15 13:18:50 +00:00
Johnni Winther aa51913101 Rename 'views' experimental flag to 'inline-class'
This feature is about to be renamed from Views to Inline Classes and
we adjust the flag name accordingly. The rename PR hasn't landed yet,
but we update the flag now to unblock work on co19 tests.

Change-Id: Ib6981b99f8541ed75f3315059a8bbca02f3a4579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275000
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2022-12-12 22:22:39 +00:00
Michael Thomsen c9a3327c26 Tweak experiment wording
Change-Id: Ic86ab50f62d26d42d10cfcb314e06c6f5292747e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273840
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-12-10 12:15:47 +00:00
Alexander Thomas 7e0d92d69d [3.0 alpha] Bump version to 3.0.0
Tested: Standard CQ.
Bug: https://github.com/dart-lang/sdk/issues/49529
Change-Id: I329b9940db7309c7e48f17eecd7a66d5b853a484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271922
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-12-06 02:40:36 +00:00
Kallen Tu ab217c355f [analyzer/cfe] Add an experiment flag for sealed class.
Have a separate flag from patterns, even though sealed families are to be shipped with patterns -- keep the work separate for now.

Change-Id: Ic3996b81d9a61f2a3b1e5137e7cc32ecc8bdec9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267289
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-11-05 00:20:50 +00:00
Johnni Winther 5baa4af7d8 [analyzer,cfe] Add 'views' feature and support for 'view class'
This adds the 'views' feature flag together with parser support
for 'view class'. If the feature is not enabled, an error is reported.

TEST=pkg/front_end/parser_testcases/views/...

Change-Id: I813ac86a0e7de9f0a5729c6d7ae35b82d1258ae5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265780
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-11-02 11:09:59 +00:00
Sam Rawlins 9896f1c647 Enable the unnamed-libraries experiment by default in 2.19.0
TEST=tests/language/library/unnamed_library_test.dart

Bug: https://github.com/dart-lang/language/issues/1073
Change-Id: I1c7fa7b4ee4450e344a7613525765e4ab590cc8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265381
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-10-25 21:10:57 +00:00
Johnni Winther 99f60a5e66 [cfe,vm] Support 'records' experiment in the sdk
This adds support for the experimental 'records' feature in the sdk
by settings its experimental release version to 2.19 and opting the sdk
into the feature the allowed_experiments.

Change-Id: I7a30212e5724e5d8ae3208f177103764b9aed737
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262760
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-10-05 09:00:30 +00:00
Sam Rawlins 51114fca8a Unnamed libraries
Fixes https://github.com/dart-lang/language/issues/1073

Spec: https://github.com/dart-lang/language/blob/master/accepted/future-releases/unnamed-libraries/feature-specification.md

This work allows library directives without a name. Every single one would look like this:

```
library;
```

:) it was a little anti-climactic implementing a non-feature like this, but there it is.

The affordance for a library directive without a name is guarded by an experiment flag, `--unnamed-libraries`.

Change-Id: I8612238359e88d6082f7e89d0d0fc624fdb45273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257490
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-09-23 05:37:39 +00:00
Paul Berry 4f87eacc5e Add an experiment flag for patterns.
Change-Id: I175e4680a0949e52ae05f46c2051c701b55a99cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-09-22 19:56:38 +00:00
Lasse R.H. Nielsen 5642199dd0 Remove uses of : as default value separator in some tests/ directories.
Change-Id: I35bb926e53e92fd02e264fb5b14feadf063fb8db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257961
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-09-07 14:49:17 +00:00
Jens Johansen 8a1dbb160f [parser] Parse record literals
This is the first stab at implementing the record expressions from
https://github.com/dart-lang/language/blob/master/working/0546-patterns/records-feature-specification.md

Change-Id: I2adb6cb3cd50d4ee45e144e86ec7011d046f6170
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253783
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-16 06:36:36 +00:00
Johnni Winther 1662441541 [cfe] Enable alternative-invalidation-strategy by default
Change-Id: If9f08f883318a5f0487beaa0f7dbd73366ed5074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251107
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-08-10 14:57:18 +00:00
Alexander Thomas 5249cd9294 [release] Bump version to 2.19
Tested: Standard CQ
Change-Id: Ic52d4d38a5b117dfcdc778dedfac08315ca30a54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251541
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-07-14 14:14:55 +00:00
Lasse R.H. Nielsen 3fc0bf7e59 Retire the 2.17 language feature experiment flags.
Remove them from tests.
(They should have been removed from tests before launcing 2.17.)

Change-Id: I546f6cb90fdf9e6ed1bb560f3715f9db163b7c68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250384
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-07-11 13:02:22 +00:00
Paul Berry 0a92b0c3aa Turn on the experimental feature inference-update-1.
Fixes https://github.com/dart-lang/language/issues/731.

Change-Id: I5fee1470efe7b891b79dcfecd33bc3670590efb3
Tested: trybots, and global presubmit in the internal mono repo
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243530
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2022-05-24 13:54:23 +00:00
Paul Berry 7b578ca616 Add experimental flag inference-update-2.
This is initially intended to support type promotion of fields
(https://github.com/dart-lang/language/issues/2020).  However, if time
allows, we may roll other type inference improvements into it.

Change-Id: Ie4548ceafe671a9a328a11ad950a4e70f4d3ca41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244766
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-05-16 21:44:05 +00:00
Paul Berry 11f08c81ba Fix description for experimental feature "inference-update-1".
Although we had previously planned to have multiple features included
under this experimental flag, we've decided that the one feature
implemented so far (horizontal inference) is worth turning on ASAP, so
other inference improvements will be implemented under a different
flag.  This change updates the description for the flag to reflect its
narrower purpose.

Change-Id: I50918e1580ae3732e11157c8269243e1adef4cba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244822
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-05-16 16:19:38 +00:00
Alexander Thomas 8033f609ff [release] Bump version to 2.18
Tested: Default CQ run; Dart VM changes were generated.
Change-Id: If0ea7b9fd2bb0de8459c9d4b39b9cc91cec73e23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240542
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-04-08 08:25:33 +00:00
Paul Berry 69d66d9bd5 Add experimental flag inference-update-1.
This is intended to be an umbrella for several features we plan to
implement during Q2:

- Improved type inference for methods like `Iterable.fold`
  (https://github.com/dart-lang/language/issues/731).

- Promotion of final fields
  (https://github.com/dart-lang/language/issues/2020).

- Other type inference and type promotion issues as time allows.

Change-Id: I31db3c15d3f6a2654650f056866c61f3d1023600
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237924
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-22 14:25:48 +00:00
Leaf Petersen d3e36fab5e Fix experiment validation test code
Fix incorrect output from experiment validation code.

Change-Id: Ia44913f94b81bd08152fe2b98da889246cb49ce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235340
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2022-03-04 03:24:41 +00:00
Leaf Petersen 35e66b5081 Enable by default the experiment flags for the 2.17 language features
TEST=Existing language tests
Change-Id: I6c2ecd73a1c7add1451d72adff94df6fdcfca9fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234704
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2022-03-04 01:08:01 +00:00
Lasse R.H. Nielsen bd8c047a8b Disable 2.15 language features experiment flags.
Step of releasing 2.16.

Change-Id: I9336289e71bcbb2cc5d298c9fb621aa6d14e99b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227540
Auto-Submit: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-01-25 19:26:49 +00:00
William Hesse 05b19a2218 Bump SDK version to 2.17
TEST=Standard CQ

Change-Id: I0eba9fa6eaa73bf9da8abdd93645a8e6eb8e601b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226691
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2022-01-10 11:05:10 +00:00
Johnni Winther 8cdc0e6474 [analyzer,cfe] Add support for macro class
This CL add the 'macros' experiment and adds support for the `macro`
modifier on class declarations. This is part of the prototyping of
the static meta-programming feature.

Change-Id: Ie4b8c5443fda3813307ea076c315baad6a90c3e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224205
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-12-21 10:45:59 +00:00
Lasse R.H. Nielsen 2360783808 Expire experiments released in earlier stable versions.
Remove messages referring to expired `non-nullable` experiment.
Remove occurrences of --enable-experiment with expired experiments.

TEST=Flags were expired. If existing tests still run, it's a success.

Change-Id: Id66d78eb0a3191ec5e31375faf0effd9ea7b768f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219789
Auto-Submit: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-11-11 08:28:31 +00:00
Alexander Thomas 55134ad5c8 Bump SDK version to 2.16
TEST=Standard CQ
Change-Id: I8598e2102df2990396afa3e56ad4a41120c5dee0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219787
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-11-10 12:51:46 +00:00
Chloe Stefantsova 29e0c5e2bc Add "super-parameters" experiment flag
Part of https://github.com/dart-lang/sdk/issues/47525.

Change-Id: If7bf6f39b9b3ade1769f158ea1ca45515f859a2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217640
Auto-Submit: Chloe Stefantsova <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-21 16:50:15 +00:00
Chloe Stefantsova 448e44191c Add "named-arguments-anywhere" experiment flag
Part of https://github.com/dart-lang/sdk/issues/47451

Change-Id: I049519061d132eb681cc3aa67b1dea5d296e540e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216801
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-14 14:16:52 +00:00
Chloe Stefantsova cfa5d6cdcb Add "enhanced-enums" experiment flag
Part of https://github.com/dart-lang/sdk/issues/47453.

Change-Id: I6d1fdc4bc170354985a9d216b13ad8f153717adf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216662
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
2021-10-14 12:19:42 +00:00
Leaf Petersen 6d741a6e5b Flip constructor-tearoffs experiment flag
Change-Id: I25538772c4b452c647518e5a5696ba79dfb38991
TEST=Existing tests for the feature.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212262
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-09-03 04:19:57 +00:00
Alexander Thomas c040c050d6 [release] Bump language version to 2.15
TEST=Standard CQ.
Change-Id: Ib50b4d23f25ea4bd074904a87068a4a8774932aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209561
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-08-10 13:06:53 +00:00
Lasse R.H. Nielsen a5e18113f3 Remove references to triple-shift and generic-metadata experiments.
TEST= removed flags from test. No behavior should change.

Change-Id: I401bfb68c082d1bd405a118d5eca6a47a807945f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199241
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-05-12 13:35:00 +00:00
Paul Berry 8df8147363 Add experimental flag for constructor tear-offs.
Change-Id: Ie9e1fc5dc3be1c7d3fe43cc052f94b74996466d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-05-10 13:33:27 +00:00
Nate Bosch 71fc33e427 Enable experiment generic_metadata
Change-Id: Iff050e6a2a1c0c2b8baca211a523f9dd77cfbd4a
TEST=Existing tests for the feature.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193748
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2021-04-27 20:16:08 +00:00