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

field initializer should win over implicit optional-argument null #2159

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

field initializer should win over implicit optional-argument null #2159

floitschG opened this issue Mar 14, 2012 · 1 comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report

Comments

@floitschG
Copy link
Contributor

given the following class A, an instantiation of the form new A() should have its field initialized with 499.
===
class A {
  var x = 499;
  A([this.x]);
}
===
Currently the x-field is initialized with null, since [this.x] must be interpreted as if it was [this.x = null].

@gbracha
Copy link
Contributor

gbracha commented Apr 12, 2012

Added Duplicate label.
Marked as being merged into #2160.

@floitschG floitschG added Type-Defect area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report labels Apr 12, 2012
copybara-service bot pushed a commit that referenced this issue Jan 8, 2024
matcher (https://github.com/dart-lang/matcher/compare/fcbd361..d9cf4f6):
  d9cf4f6  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#240)
  7ea9047  2023-12-13  Kevin Moore  Update test_api dependency, bump & fix lints, prepare release (#237)
  050fdda  2023-12-13  Kevin Moore  blast_repo fixes (#238)

mockito (https://github.com/dart-lang/mockito/compare/57a7c82..e15e000):
  e15e000  2023-12-14  Sam Rawlins  Bump mockito to 5.4.4
  a2a6566  2023-12-14  Copybara-Service  Merge pull request #726 from provokateurin:chore/deps/test_api-0.7
  bda332c  2023-12-14  jld3103  chore(deps): Allow test_api 0.7
  9bd6fb0  2023-12-12  Paul Berry  Remove mockito pre-null-safety tests.

test (https://github.com/dart-lang/test/compare/43ff5bf..846d73e):
  846d73ee  2024-01-01  dependabot[bot]  Bump actions/upload-artifact from 3.1.3 to 4.0.0 (#2165)
  0ab56790  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#2167)
  3b960c3e  2024-01-01  dependabot[bot]  Bump github/codeql-action from 2.22.8 to 3.22.12 (#2166)
  30543cae  2023-12-19  Nate Bosch  Add more logging around iframe startup (#2160)
  e56a5e22  2023-12-13  Jacob MacDonald  small cleanup in catch (#2159)
  15b39372  2023-12-13  Jacob MacDonald  handle missing package config files (#2158)
  9667cca8  2023-12-13  Jacob MacDonald  release test_api 7.0.0, test_core 6.0.0, and test 1.25.0 (#2156)
  b3fb1486  2023-12-13  Nate Bosch  Remove support for Internet Explorer (#2114)
  48a2bc3d  2023-12-13  Derek Xu  Update the package:vm_service constraint to allow version 14.x (#2157)

Change-Id: I386444652c47cd14a61665599d86dc3a7669a2fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345341
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@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). closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

2 participants