Skip to content
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

Parenthesis should be allowed in compile-time constants. #2041

Closed
floitschG opened this issue Mar 7, 2012 · 1 comment
Closed

Parenthesis should be allowed in compile-time constants. #2041

floitschG opened this issue Mar 7, 2012 · 1 comment
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).

Comments

@floitschG
Copy link
Contributor

Currently
final x = (2 + 3) * 5;
is not allowed since (2 + 3) is not a compile time constant.

I propose to extend the list of constant expressions by adding

  • an expression of the form (e) where e is a constant expression.
@gbracha
Copy link
Contributor

gbracha commented Apr 12, 2012

Fixed in 0.09 draft.


Set owner to @gbracha.
Added Done label.

@floitschG floitschG added Type-Defect area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Apr 12, 2012
dart-bot pushed a commit that referenced this issue Feb 26, 2019
New in this update:
```
git log --oneline --no-decorate 9f00679ef47bc79cadc18e143720ade6c06c0100..980fc947db32bca6ae7d07fbb4ad0fcdba0050ec
980fc947 Add support for global activating package from a custom pub URL (#2041)
605cafb1 "features" is not a completely implemented or documented – hide flags (#2045)
73b66cd3 Merge pull request #2035 from sigurdm/logout_command
2b03587d dartfmt again
ea805dfb Fix help-expectation
6f759c1f gitfmt
90079421 deps: move package_resolver to a dev dependency
297f017a enable and fix a number of lints
f70ee39b Update to latest dependencies, require dart 2.1, fix lints
3446fb0d Add logout command
283471e7 Merge pull request #2016 from RedBrogdon/changelog
4c00f413 Update/add www.dartlang.org URLs (#2021)
f7b147f9 Correcting nerfed changelog test.
b9308223 Edited warning messages, addressed review issues.
9e9c8ed7 Fixed race conditions in test case. (#2020)
ec972168 Removed references to gitsubmodules (#2019)
ac8ad792 Copyright dates.
f9d35d34 Formatted via dartfmt.
a3351369 Adding ChangelogValidator to the list of validators.
a826b121 Adds changelog validator and its tests.
2233e3d5 Update the required pkg:http (#1996)
75d8453a Update all of the obvious dependencies
d07dafa5 Fix unnecessary `this` lints
43a91d12 Update to latest build_runner (#1966)
b3a2cfb7 Add check for a scheme on PUB_HOSTED_URL (#1972)
6626bda3 Update tests for SDK constraint validation (#1968)
```


Change-Id: Ib7c5ec86e5a6d67094b8e70a32ff41efe571c074
Reviewed-on: https://dart-review.googlesource.com/c/94380
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
copybara-service bot pushed a commit that referenced this issue Jun 22, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/793d575..4757339):
  47573391  2023-06-21  Sam Rawlins  Remove dependency on code_builder (#3451)
  370cb2c4  2023-06-21  Sam Rawlins  Remove all use of package:build (#3448)
  70c2897b  2023-06-20  Sam Rawlins  Simplify some code in PackageBuilder (#3447)
  1a8403ec  2023-06-20  Sam Rawlins  Rank libraries lower than classes and class members (#3446)

lints (https://github.com/dart-lang/lints/compare/4b79906..79581ff):
  79581ff  2023-06-20  Devon Carew  update core and recommended from the recent review (#136)

test (https://github.com/dart-lang/test/compare/3d5afed..cdc8178):
  cdc8178b  2023-06-21  Nate Bosch  Ignore a false positive for unreachable_from_main (#2041)

vector_math (https://github.com/google/vector_math.dart/compare/a3aca09..c147038):
  c147038  2023-06-20  Lukas Klingsbo  `Vector2` constructor benchmark (#297)

web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/af72652..7fb82f2):
  7fb82f2  2023-06-21  Brian Quinlan  Add a note explaining why the onerror doesn't generate a more detailed exception (#273)

webdev (https://github.com/dart-lang/webdev/compare/b58edb7..6fe17fe):
  6fe17fe8  2023-06-21  Elliott Brooks  Prepare Webdev `3.0.5` release (#2151)
  3b7f266c  2023-06-21  Elliott Brooks  Small fixes for the `release` script (#2150)
  45446ec9  2023-06-20  Elliott Brooks  Reset DWDS to `19.0.2-wip` (#2149)
  91cbd183  2023-06-20  Elliott Brooks  Prepare DWDS for release to version 19.0.1 (#2145)
  a7b81589  2023-06-20  Elliott Brooks  Don't run proper_release_test with the rest of the test common tests (#2146)
  aa586d29  2023-06-20  Elliott Brooks  Fix DCM errors in `chrome_proxy_service.dart` (#2148)

Change-Id: I27850a0b8b1241b03f07a5832555d4da6dfbff44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310962
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).
Projects
None yet
Development

No branches or pull requests

3 participants