Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Issue 2678003002: Specification adjustments for covariant overrides in Dart 1. (Closed)

Created:
3 years, 10 months ago by eernst
Modified:
3 years, 9 months ago
CC:
reviews_dartlang.org, floitsch
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Specification adjustments for covariant overrides in Dart 1. Addresses the 1.50 bullet in sdk issue #28164. R=lrn@google.com Committed: https://github.com/dart-lang/sdk/commit/1e483f0bccd170f644841d64f26a88827273c9ba

Patch Set 1 #

Total comments: 8

Patch Set 2 : Review response #

Patch Set 3 : Added spec of compile-time errors for some placements of `covariant` #

Patch Set 4 : Just noticed that we can simplify the grammar a bit more #

Total comments: 4

Patch Set 5 : Review response #

Patch Set 6 : Rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -40 lines) Patch
M docs/language/dart.sty View 1 chunk +1 line, -0 lines 0 comments Download
M docs/language/dartLangSpec.tex View 1 2 3 4 9 chunks +58 lines, -40 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
eernst
Covariant overrides spec for Dart 1.
3 years, 10 months ago (2017-02-06 13:16:50 UTC) #2
Lasse Reichstein Nielsen
https://codereview.chromium.org/2678003002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/2678003002/diff/1/docs/language/dartLangSpec.tex#newcode396 docs/language/dartLangSpec.tex:396: declaredIdentifier (`,' identifier)* You cannot apply "covariant" to the ...
3 years, 10 months ago (2017-02-06 17:07:05 UTC) #3
eernst
Review response. Note that some changes will be part of the next patch, as mentioned ...
3 years, 10 months ago (2017-02-10 14:31:57 UTC) #4
eernst
Compile-time errors now specified; grammar simplified, too!
3 years, 10 months ago (2017-02-10 15:45:49 UTC) #7
Lasse Reichstein Nielsen
lgtm https://codereview.chromium.org/2678003002/diff/100001/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/2678003002/diff/100001/docs/language/dartLangSpec.tex#newcode923 docs/language/dartLangSpec.tex:923: ((\EXTERNAL{} \STATIC{} ?))? getterSignature; Remove space before '?' ...
3 years, 10 months ago (2017-02-25 11:57:33 UTC) #8
eernst
Committed patchset #6 (id:140001) manually as 1e483f0bccd170f644841d64f26a88827273c9ba (presubmit successful).
3 years, 9 months ago (2017-03-02 12:41:49 UTC) #10
eernst
3 years, 9 months ago (2017-03-02 12:43:01 UTC) #11
Message was sent while issue was closed.
Review response. Did not change metadata: Goes to another CL.

https://codereview.chromium.org/2678003002/diff/100001/docs/language/dartLang...
File docs/language/dartLangSpec.tex (right):

https://codereview.chromium.org/2678003002/diff/100001/docs/language/dartLang...
docs/language/dartLangSpec.tex:923: ((\EXTERNAL{} \STATIC{} ?))?
getterSignature;
On 2017/02/25 11:57:32, Lasse Reichstein Nielsen wrote:
> Remove space before '?' (just for consistency).

Done.

https://codereview.chromium.org/2678003002/diff/100001/docs/language/dartLang...
docs/language/dartLangSpec.tex:2441: (`@' qualified ({\escapegrammar `.'}
identifier)? (arguments)?)*
On 2017/02/25 11:57:32, Lasse Reichstein Nielsen wrote:
> Shouldn't we allow type-parameters for the class here?

That's not related to the overall contents of the CL, and it would have
implications for implementations. However, the tools dart, dart2js, and
dartanalyzer allow for this:

  class C<X> { final X x; const C(this.x); }
  const c = const C<String>('Hello!');
  @c main() {}

So they can all handle it "semantically", just not syntactically. Just checked
with the ANTLR grammar, and it does not create any ambiguities or other parsing
issues there.

All tools that I could think of (including, e.g., dartfmt) reject the type
arguments, which just shows that they follow the current grammar in the spec.

This means that we can just do it, and then request an implementation from
various tool groups, but I'll take that to a separate CL, and leave the text
as-is here for now.

Powered by Google App Engine
This is Rietveld 408576698