42c4c3c1bd
Change-Id: I542369fc2d8443bb0094fdedc11596fdc2f20e2d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159084 Commit-Queue: Javier López-Contreras <jlcontreras@google.com> Reviewed-by: Erik Ernst <eernst@google.com> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
17 lines
447 B
Dart
17 lines
447 B
Dart
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// A value class will automatically create an empty constructor if there is none yet
|
|
|
|
import 'value_class_support_lib.dart';
|
|
|
|
@valueClass
|
|
class Animal {
|
|
final int numberOfLegs;
|
|
}
|
|
|
|
main() {
|
|
var cat = Animal(numberOfLegs: 4);
|
|
}
|