Lasse R.H. Nielsen
52691c6937
Add informal specification for optional-new/const, constructor tearoffs.
...
R=floitsch@google.com
Status: under discussion
Review-Url: https://codereview.chromium.org/2929753003 .
2017-06-20 13:21:36 +02:00
Lasse R.H. Nielsen
c4da9198c1
Add informal specification of asserts in initializer lists.
...
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2927933002 .
2017-06-08 13:45:46 +02:00
Erik Ernst
0603b1872c
Fixed typo in spec.
...
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2916263003 .
2017-06-02 11:14:53 +02:00
Lasse R.H. Nielsen
13f3df7e0c
Change specification of main.
...
R=eernst@google.com , rnystrom@google.com
Review-Url: https://codereview.chromium.org/2852533003 .
2017-06-01 13:51:30 +02:00
Erik Ernst
539e463fe8
Removes spurious brace in dartLangSpec.tex
...
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2895263002 .
2017-05-22 16:50:24 +02:00
Lasse Reichstein Holst Nielsen
26d6e3596d
Make void-arrow-functions statically accept any expression type.
...
R=eernst@google.com
Review-Url: https://codereview.chromium.org/2873313003 .
2017-05-22 16:19:53 +02:00
Erik Ernst
3b5874a332
Adjusted initializer rules, changing a run-time error to compile-time.
...
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2843733002 .
2017-05-19 14:22:35 +02:00
Peter von der Ahé
5e040f1abf
Add comment about metadata syntax problem in static methods.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2882173002 .
2017-05-15 13:55:06 +02:00
Lasse R.H. Nielsen
122345e356
Specify that a void return type doesn't cause errors in checked mode.
...
R=eernst@google.com
Review-Url: https://codereview.chromium.org/2875643002 .
2017-05-11 14:17:57 +02:00
Peter von der Ahé
4880a2876e
Rewrite mixin application handling in Fasta.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2862223002 .
2017-05-09 09:22:57 +02:00
Erik Ernst
ae1091805d
Fixed typo: "keyword parameter" changed to "named parameter".
...
Resolves https://github.com/dart-lang/sdk/issues/29464 .
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2838853003 .
2017-04-26 16:11:59 +02:00
Erik Corry
2fb5d08102
Spelling a
...
R=ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2841543002 .
2017-04-24 14:53:51 +02:00
Erik Corry
4b9bba55b4
Stoppp using trippple consonants
...
R=ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2833073002 .
2017-04-21 17:50:13 +02:00
Lasse R.H. Nielsen
94b23d3b12
Fix text around least upper bound.
...
R=eernst@google.com
Review-Url: https://codereview.chromium.org/2802633002 .
2017-04-05 14:09:07 +02:00
Kevin Millikin
74c576911b
Ignore LaTeX output files in docs/language.
...
BUG=
R=eernst@google.com , zhivkag@google.com
Review-Url: https://codereview.chromium.org/2763393006 .
2017-03-24 15:45:15 +01:00
Erik Ernst
1e483f0bcc
Specification adjustments for covariant overrides in Dart 1.
...
Addresses the 1.50 bullet in sdk issue #28164 .
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2678003002 .
2017-03-02 13:41:37 +01:00
Lasse R.H. Nielsen
6a77f268bb
Revert "Add bnf.sty to github, since it is referenced by the latex language spec file."
...
R=eernst@google.com
Review-Url: https://codereview.chromium.org/2723623003 .
2017-02-28 11:35:35 +01:00
Regis Crelier
3d4fce91e2
Add bnf.sty to github, since it is referenced by the latex language spec file.
...
R=gbracha@google.com
Review-Url: https://codereview.chromium.org/2705323003 .
2017-02-22 10:40:23 -08:00
Erik Ernst
5de9108c16
Adjusted spec to outlaw built-in identifiers in type annotations.
...
Addresses issue https://github.com/dart-lang/sdk/issues/28817 .
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2704573004 .
2017-02-20 09:27:37 +01:00
Erik Ernst
170ba4aa32
Added covariant-from-class informal spec file for broader access.
...
Review-Url: https://codereview.chromium.org/2700533004 .
2017-02-16 13:11:15 +01:00
Lasse Reichstein Holst Nielsen
c41ae15713
Specify FutureOr.
...
R=eernst@google.com , floitsch@google.com
Review-Url: https://codereview.chromium.org/2664263002 .
2017-02-03 08:02:09 +01:00
Lasse R.H. Nielsen
ef31637857
Fix specification of multiline strings.
...
Now say that NEWLINE is one of CR, LF or CR+LF, and that all of these
contribute a single LF to the string value.
Fixes issue #14073
BUG= http://dartbug.com/14073
R=eernst@google.com , johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2665613003 .
2017-01-31 10:26:01 +01:00
Lasse R.H. Nielsen
c77a4a92b2
Add changelog to dart spec file.
...
R=eernst@google.com , floitsch@google.com
Review-Url: https://codereview.chromium.org/2650693002 .
2017-01-23 14:00:28 +01:00
Lasse R.H. Nielsen
2f2508470b
Spec tweak. Fix semicolon escape-grammar where it doesn't match the rest.
...
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2638403006 .
2017-01-20 14:32:11 +01:00
Lasse R.H. Nielsen
fcff3fe4e7
Make it more explicit that Null
doesn't extend anything but Object
.
...
Fix dart.sty
Address new comments on https://codereview.chromium.org/2555343004/
R=eernst@google.com
Review-Url: https://codereview.chromium.org/2641873003 .
2017-01-20 09:03:43 +01:00
Bob Nystrom
13f71634b0
Informal proposal for covariant overrides. ( #28176 )
...
Added informal specification of covariant overrides.
It is available as a new file, docs/language/informal/covariant-overrides.md.
2017-01-19 06:22:54 -08:00
Lasse R.H. Nielsen
6904227a56
Fix bug in dart.sty.
...
R=floitsch@google.com
Review-Url: https://codereview.chromium.org/2644513003 .
2017-01-19 12:09:17 +01:00
Erik Ernst
473f2c9a60
Eliminated usages of "field" in the spec.
...
It turned out to be "instance variable" or "static or instance
variable" in all cases. I considered writing "member variable" for the
latter, but we would then need to introduce that phrase somewhere, and
maybe refer to it at each usage, which would be more verbose.
Fixes #24333 .
BUG=
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2613293002 .
2017-01-09 11:29:01 +01:00
Erik Ernst
c63f8010df
Performed some keyword related clean-ups.
...
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2609413006 .
2017-01-06 13:53:28 +01:00
Bob Nystrom
376b9a31c5
Add README for informal specs directory.
...
R=eernst@google.com , leafp@google.com
Review-Url: https://codereview.chromium.org/2596933002 .
2016-12-21 15:52:54 -08:00
Erik Ernst
88037f0a64
Added compile-time errors for supertypes: Type alias missing, and more.
...
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2585723002 .
2016-12-16 14:02:56 +01:00
Lasse R.H. Nielsen
10abaf89fd
Make Null act like the bottom type for all the (default nullable) types.
...
BUG= http://dartbug.com/28024
R=eernst@google.com
Review URL: https://codereview.chromium.org/2555343004 .
2016-12-09 12:59:46 +01:00
Lasse R.H. Nielsen
81f8ea0a0a
Fix unintended spec change: Final fields not being initialized is only a warning.
...
A recent spec change made it an error, but the existing spec didn't actually
say that - it's one of the few warnings that do not correspond to e runtime
error.
R=eernst@google.com
Review URL: https://codereview.chromium.org/2542253003 .
2016-12-05 10:48:39 +01:00
Lasse R.H. Nielsen
c05eb97461
Add message to assert in specification.
...
R=eernst@google.com
Review URL: https://codereview.chromium.org/2530083002 .
2016-11-28 09:19:28 +01:00
Lasse Reichstein Holst Nielsen
843bb96813
Change how the language specification describes control flow.
...
Changed to compositionally describing how an expression or statement can
complete (normally, throw, return, break, continue), and propagating the
completion to the surrounding statements handling those behaviors.
This should not change the current behavior except in a few cases where
the existing specification was vague, misleading or just wrong.
Actual changes:
- The super call in an initializer list is now always called at the end,
even if it is allowed to be written earlier. This matches existing
VM behavior.
Initialization of initializer expressions are specified
as part of constructor execution, not something happening
at the `new` operator.
- The cancel call to a stream subscription when exiting an async for-in
loop is now made explicit, and its returned future is explicitly
awaited for.
Previously it was unclear what happened with that future.
- Pausing a surrounding async-for loop has been added everywhere
the body of the loop can suspend, just before the suspension.
The loop subscription is not resumed until reaching the end of the body,
which is equivalent to resuming it after each suspend
and then pausing it again when the synchronous execution reaches
the next suspend.
So, easier and doesn't change the behavior of the loop itself,
but it's a visible change if you check the onPause/onResume
of the loop stream.
Spec now recognizes that the pause call may throw on an invalid
implementation of StreamSubscription.
Addresses issues #25859 , #25856 , #25850 , #25848 , #25847 , #25749 , #25634 , #25539 , #25421 , #25412 , #25381 , #25234 , #25005 , #24859 , #24748 , #23779 , #23700 , #23628 , #22908 , #21858 (and likely more).
BUG= http://dartbug.com/25859 http://dartbug.com/25856 http://dartbug.com/25850 http://dartbug.com/25848 http://dartbug.com/25847 http://dartbug.com/25749 http://dartbug.com/25634 http://dartbug.com/25539 http://dartbug.com/25421 http://dartbug.com/25412 http://dartbug.com/25381 http://dartbug.com/25234 http://dartbug.com/25005 http://dartbug.com/24859 http://dartbug.com/24748 http://dartbug.com/23779 http://dartbug.com/23700 http://dartbug.com/23628 http://dartbug.com/22908 http://dartbug.com/21858
R=eernst@google.com
Review URL: https://codereview.chromium.org/2399343002 .
2016-11-25 09:30:17 +01:00
Lasse R.H. Nielsen
de8e04d76a
Make C()
, where C
is a class name, a compile-time error.
...
Fixers issue #27651
BUG= http://dartbug.com/27651
R=eernst@google.com , floitsch@google.com , fschneider@google.com
Review URL: https://codereview.chromium.org/2444843002 .
2016-11-17 09:56:54 +01:00
Lasse R.H. Nielsen
2e56c7b8fa
Spec: Make fontenc understand that greater than is not an inverse question mark.
...
No longer using a 7-bit font. Welcome to the 21th century.
R=eernst@google.com
Review URL: https://codereview.chromium.org/2487193002 .
2016-11-09 14:31:28 +01:00
Lasse R.H. Nielsen
f3288982de
Spec: Rewrite lambdas to simpler semantics instead.
...
This is instead of introducing a let-construct.
R=eernst@google.com
Review URL: https://codereview.chromium.org/2433943002 .
2016-11-09 13:21:39 +01:00
Erik Ernst
5bf3c1fa4d
Fixed erroneously commented-out \end{itemize}
...
Commit 4cb61407a8
, CL
https://codereview.chromium.org/2476613002 introduced a spurious `%`
which causes `latex dartLangSpec.tex` to fail. This CL fixes it.
Review URL: https://codereview.chromium.org/2487113003 .
2016-11-09 12:30:34 +01:00
Lasse Reichstein Holst Nielsen
4cb61407a8
Remove generalized tear-offs from the specification.
...
Fixes issue #27519
BUG= http://dartbug.com/27519
R=eernst@google.com
Review URL: https://codereview.chromium.org/2476613002 .
2016-11-07 14:53:27 +01:00
Erik Ernst
06416e404b
Fixed typo in spec: REHTROW --> RETHROW
...
Review URL: https://codereview.chromium.org/2462993002 .
2016-10-31 10:15:03 +01:00
Lasse R.H. Nielsen
6e6ff496ed
Allow rethrow
to end a switch case. Allow braces around switch cases.
...
Add `rethrow` as one of the statements that are allowed to end a switch case
without a warning.
Change wording to not claim that `throw` is a statement.
Also allow wrapping case statements in a block statement without causing
more warnings. Currently, a `case 4: { break; }` is required to warn because
the last statement is a block statement, not a break statement.
Fixes issue #27650
BUG= http://dartbug.com/27650
R=eernst@google.com , floitsch@google.com , rnystrom@google.com
Review URL: https://codereview.chromium.org/2447613003 .
2016-10-25 13:04:36 +02:00
Lasse R.H. Nielsen
efb9a12811
Add =
as default-value separator for named parameters.
...
Fixes issue #27559 .
BUG= http://dartbug.com/27559
R=asiva@google.com , eernst@google.com , floitsch@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org/2411633002 .
2016-10-14 11:25:25 +02:00
Lasse R.H. Nielsen
cc6d93b57c
Make it a compile-time error if a library has part "uri";
twice for the same uri.
...
If the part declaration is non-empty, it will always cause a compile-time error anyway due to duplicate declarations in the library scope. This just makes it explicit that it's an error in all cases, and avoids the special case of the empty part file being silently accepted until you put something in it.
R=eernst@google.com
Review URL: https://codereview.chromium.org/2371743002 .
2016-10-05 11:12:22 +02:00
Lasse R.H. Nielsen
16d806b0aa
Make the spec specific about the return type of sync*/async/async* function.
...
Now requires the type to be a supertype of `Iterable<T>`/`Future<T>`/`Stream<T>`
for some `T`. This allows, say, all `Future<T>` return types for `async` but
disallows using a different class implementing `Future`:
```
MyFuture foo() async {}
```
gives a static warning (error in Dart 2) because the return type is statically
known to be unsatisfied.
Fixes issue #27470
BUG= http://dartbugcom/27470
R=eernst@google.com , floitsch@google.com
Review URL: https://codereview.chromium.org/2392513002 .
2016-10-05 10:24:10 +02:00
Lasse R.H. Nielsen
9e032f493d
Add documentation to the mixin superclass requirement description.
...
Fixes issue #25312
BUG= http://dartbug.com/25312
R=eernst@google.com
Review URL: https://codereview.chromium.org/2375913002 .
2016-09-29 10:24:35 +02:00
Lasse R.H. Nielsen
b98484fbc1
Fix spec reference to non-existing mirrors method.
...
Fixes #25549
BUG= https://dartbug.com/25549
R=eernst@google.com
Review URL: https://codereview.chromium.org/2381483002 .
2016-09-28 13:38:14 +02:00
Lasse R.H. Nielsen
debbf68223
Fix bug effectively stating that 1e8 is an integer literal, not a double.
...
Fix typo in spec - uses `/` when intending division by zero error.
Fixes issues #26053 , #27279
BUG= http://dartbug.com/26053 , http://dartbug.com/27279
R=eernst@google.com , floitsch@google.com
Review URL: https://codereview.chromium.org/2370853004 .
2016-09-28 09:51:10 +02:00
Lasse R.H. Nielsen
574ae435f3
Allow surrogates in string literals.
...
Fixes issue #26620
BUG: http://dartbug.com/26620
R=asiva@google.com , brianwilkerson@google.com , floitsch@google.com , hausner@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org/2304923002 .
2016-09-26 13:23:41 +02:00
Erik Ernst
9a1e050a85
Adjusts the spec to include access to initializing formals.
...
Adresses https://github.com/dart-lang/sdk/issues/26659 .
R=lrn@google.com
Review URL: https://codereview.chromium.org/2190373002 .
2016-08-23 18:28:40 +02:00