Skip to content

Commit

Permalink
Specify primary constructors (#3023)
Browse files Browse the repository at this point in the history
This is a proposed feature specification that specifies the feature _primary constructors_. A primary constructor is a syntactically concise notation for a constructor. For instance:

```dart
// Using current Dart.

class Point {
  final int x;
  final int y;
  const Point(this.x, [this.y = 0]);
}

// Using a primary constructor.

class const Point(int x, [int y = 0]);
```
  • Loading branch information
eernstg authored Aug 23, 2023
1 parent 913b81e commit 6091eef
Show file tree
Hide file tree
Showing 64 changed files with 2,153 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ The following license applies to all parts of this repository.
See https://github.com/dart-lang/sdk/blob/main/LICENSE for the license
of the Dart language implementation.

Copyright 2018, the Dart project authors.
Copyright 2018, the Dart project authors.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand All @@ -16,7 +16,7 @@ met:
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Expand Down
Loading

0 comments on commit 6091eef

Please sign in to comment.