mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
![]() The current definition requires the expression to be valid and compile-time constant if constructor parameters are considered compile-time constants with types appropriate for their context. This is necessary but not sufficient, so this CL adds the further requirement that the expression must also be a valid (not necessarily constant) expession if the parameters are considered non-constant variables. This rules out the case: const C(x) : y = const [x]; where the current specification would, technically, allow it as a potentially constant expression and therefore be a valid const constructor. In practice it would never work if the constructor is used with "new" instead of "const". This is not really a specification *change* - existing implementations has this restriction anyway. Addressed the concern of #24970. BUG= http://dartbug.com/24970 R=eernst@google.com, gbracha@google.com Review URL: https://codereview.chromium.org/1465473002 . |
||
---|---|---|
.. | ||
dart.sty | ||
dartLangSpec.tex | ||
Makefile |