Commit graph

244 commits

Author SHA1 Message Date
Erik Ernst 46a9ed0617 Added example about calling a tear-off with a wrong-shape argument list
The rendered version has been updated: https://gist.github.com/eernstg/683310d8de99089ec3d05f3f4954c151

Change-Id: Id556e6d4dcd30c2da3f434049242bfbed6363341
Reviewed-on: https://dart-review.googlesource.com/47800
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-05-03 11:57:17 +00:00
Erik Ernst 6802746ad7 Fixed a couple of typos in subtyping.md
Sergey pointed out a couple of name clashes, and I renamed some indices
in order to avoid them. At the same time, I fixed a couple of typos
and adjusted the whitespace to be more similar to other *.md files.

Finally, I adjusted the wording involving 'algorithmic' and 'syntax
directed' in order to make it explicit that they stand for the same
thing.

Change-Id: Ic03b907f4bdc722d9ba218d38077addf9cc4a777
Reviewed-on: https://dart-review.googlesource.com/50981
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-13 05:59:02 +00:00
Erik Ernst cf93009caf Removed the magic const feature from implicit-creation.md
Here is a rendered version of the document which was
updated to match patch set 7:
https://gist.github.com/eernstg/cc2e6bc384fc722416a5fb58a1166034.

Change-Id: I2902fe4fcb86d01b4fe70ba1aab0d749f833ff39
Reviewed-on: https://dart-review.googlesource.com/49903
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-10 14:33:56 +00:00
Erik Ernst 4b2b15f53e Clarify that mixin application drops static members
Change-Id: If0adcdb9423d856d629dd8002ba843697dafb770
Reviewed-on: https://dart-review.googlesource.com/49360
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-04-04 12:26:51 +00:00
Lasse R.H. Nielsen 289a3d2799 Remove ~/ special casing in static type system.
The "special case" text just says that the return type of `~/` on `int` is `int`, which is also its declared type, so the text isn't necessary.

Bug: http://dartbug/com/15650
Change-Id: Iba7fcc621e27dcba24dfdede2a0960f2f5ecd2f9
Reviewed-on: https://dart-review.googlesource.com/48144
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-03-23 22:39:29 +00:00
Erik Ernst 472ec7780f Added first draft spec of dynamic-members.md
In response to the discussions in SDK issue 32414 about the typing of
members of `Object` when the receiver type is `dynamic`.

A rendered version of this document is available at
https://gist.github.com/eernstg/fc0094b0230ea18b9507092e50dab537
(uploaded as of patchset 6).

Change-Id: I3a74ecd5e7c9c9c05fadda5b1fa0d644561796e9
Reviewed-on: https://dart-review.googlesource.com/46247
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-03-14 16:50:03 +00:00
Erik Ernst 7d07f8d68b Add new allowed placements of void expressions for void-to-void flow.
As an example of a void-to-void data flow, consider `void x = foo();`,
where `foo` has return type `void`. In general, a void-to-void data
flow is a computation which is trivial (we may select one of two
branches in a conditional expression and otherwise only pass the value
on without any computation) where the expression being evaluated has
type void, and the target that receives the value is also of type
void.

This CL makes adjustments to generalized-void.md such that void-to-void
data flows are allowed.

Change-Id: Ia1722cd399c77c57cc5c61e9c10b7a84a18fe107
Reviewed-on: https://dart-review.googlesource.com/38060
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2018-03-14 16:46:40 +00:00
Leaf Petersen c8ee601268 Add feature specification draft for Dart 2.0 subtyping
This is a draft of a feature specification for the Dart 2.0 subtyping
relation.

See https://github.com/dart-lang/sdk/blob/2_0_subtyping/docs/language/informal/subtyping.md
to preview the markdown during review.

Bug:
Change-Id: Ib67fdb22b68a45e8dc1c1831326c82e735c89404
Reviewed-on: https://dart-review.googlesource.com/30927
Reviewed-by: Erik Ernst <eernst@google.com>
2018-03-06 00:02:38 +00:00
Leaf Petersen fdaaa874a0 Draft feature specification for mixin inference
Change-Id: I0c1aa6877cc4b33adcd0be15800d93667d149545
Reviewed-on: https://dart-review.googlesource.com/38940
Reviewed-by: Erik Ernst <eernst@google.com>
2018-02-23 05:56:03 +00:00
Erik Ernst f5a00ae3a8 Removed references to FutureOr<void> from generalized-void.md
It turns out that the special case for FutureOr<void> that I added in
https://dart-review.googlesource.com/c/sdk/+/35920 was misunderstood,
nobody really wanted it.

This CL removes all references to `FutureOr` in generalized-void.md,
which removes that special case and also the concept of types that are
"void equivalent" (because such types are not used any more).

The message here is that we are now more consistent in our protection
of developers against accidentally discarding a value which is
meaningful (just like `void foo() { return 42; }`), because they've
forgotten that the return type is `void`.

Change-Id: Ia4e6e00b2d33ff434923de7eb78d000cd7cc1c3e
Reviewed-on: https://dart-review.googlesource.com/41822
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-22 07:58:19 +00:00
Erik Ernst 38698fcf90 Fixed two typos (=> LaTeX failures) in dartLangSpec.tex
Change-Id: Ie3a711790d56cad9b2a5c21c35aae38956a69f41
Reviewed-on: https://dart-review.googlesource.com/42243
Reviewed-by: Erik Ernst <eernst@google.com>
2018-02-19 16:24:07 +00:00
Erik Ernst cec672c793 Modified description of \CALL{} for new treatment of callable objects
Change-Id: I6cc412bcdeb9772af598fbb1309cafaf490c487f
Reviewed-on: https://dart-review.googlesource.com/41360
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-19 14:47:48 +00:00
Lasse R.H. Nielsen 63c6851dd0 Update induced mixin application constructor definition.
Change-Id: Ic6eeffd2e3d348f636af5ab4644cc60b87e85506
Reviewed-on: https://dart-review.googlesource.com/29060
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-02-19 10:47:19 +00:00
Erik Ernst c01d59bc7e Adjusted generalized-void.md to make for-in on a void iterator an error, except when the iteration variable has type void.
A similar rule applies to asynchronous for-in loops.

Change-Id: I88ba234c27a38167eaac0350d269e88894a0fe9e
Reviewed-on: https://dart-review.googlesource.com/35920
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2018-02-14 18:44:03 +00:00
Erik Ernst 9f9987f709 It is now an error to have void foo() { return 42; }
The language team several times agreed to make it an error when a
non-void expression `e` is used in `return e;` in the body of a
function whose return type is `void`.

When `void` is changed from a near-bottom type to a top type, the
wording in the language specification (dartLangSpec.tex) does _not_
ensure that this is an error, because all types are assignable to
`void`, so we need a specific rule saying that it is an error.

This CL adds such a rule to the feature spec for generalized void.
It also adds a rule that makes it an error to have return type `void`
in a function marked `async*` or `sync*`, based on the reasoning
that they "are returning a Future/Stream/Iterable semantically",
and it would now be an error if they did that explicitly.

Change-Id: I22fed9e9fc6097bb50100a151b964045e41ef173
Reviewed-on: https://dart-review.googlesource.com/35680
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2018-02-14 11:15:12 +00:00
Erik Ernst 6e3a274c5f "Magic" implicit creation.
Description which is relevant as of January 2018:

The more aggressive approach where `const` is inserted whenever
possible (for instance creation expressions) and whenever required
(for composite literals), and `new` is inserted otherwise, is now
the agreed policy. This means that the remaining discussion is on
the specification of this policy, not the policy itself. This has
been true approximately since Dec 1st, 2017.

Here is a brief overview of the feature which is specified in the
document added by this CL:

The introduction of 'implicit creation' adjusts the grammar such
that instance creation expressions (such as `new C()`) can always
omit the keyword (`new` or `const`). The semantics is that these
expressions will still invoke the same constructor (which may
produce a fresh instance in case of a generative constructor, and
some object that may or may not be new in case of a factory),
as if `new` or `const` had been added implicitly. The choice of
whether to add `new` or `const` is made according to the policy
described above.

----------------------------------------------------------------------
Original description, FYI:

Copy of Rietveld 3012703002: magic optional const

Adjusted informal spec optional-new to insert `const` whenever possible

The current version of optional-new.md specifies that `const` should be
inserted into certain syntactic phrases (when specific identifiers
satisfy some constraints), but only when these phrases occur in a const
context.

This CL changes that approach and specifies that `const` should also be
inserted outside const contexts, if the resulting expression is a
correct constant expression.

We haven't yet decided on whether we want the current (predictable)
model or we want the more "magic" one specified in this CL; this CL
is intended to be landed if we choose the latter, and discarded if we
choose the former.

Change-Id: I602e7eaf3d4c7904277af45c6f62089c77bd5117
Reviewed-on: https://dart-review.googlesource.com/3160
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-12 09:03:00 +00:00
Erik Ernst b70145b56a Adjust covariant-from-class.md to specify strict overriding.
The covariant parameter related feature specs were written to specify
that overriding admits a type annotation `T` on a formal parameter as
long as `T <: S` or `S <: T` for every type annotation `S` on a
corresponding formal parameter in an overridden declaration (directly
or indirectly).

This CL changes the rules such that a covariant-from-class parameter
must satisfy the standard constraints (contravariance) instead, which
is needed in order to ensure that an important optimization (on self-
sends) is valid.

This makes the spec follow the actual implementation, i.e., the change
will not break any existing software.

Change-Id: Ic871cc16c09220a385d68d9ec32c7a06683db87b
Reviewed-on: https://dart-review.googlesource.com/37664
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2018-02-07 17:43:29 +00:00
Erik Ernst 9f803a36eb Adjusted status indications on feature specs
The Dart 1 specification of 'generic method syntax' had no status
indicator, it is now marked as 'background material' because generic
methods (in full) have been integrated into the language specification.
Several other changes of a similar nature.

Implication: It should now be possible for readers of these documents
to trust their status indication. As we go, we will need to update them
again, especially when something is integrated into the language
specification.

Do we want to migrate background material to another directory? Do we
want to rename the directory `informal` to `feature` or somesuch?

Change-Id: Ia3851bdbe7b5a46d71848c376906f95feb4db349
Reviewed-on: https://dart-review.googlesource.com/34663
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-01-16 13:22:28 +00:00
Lasse R.H. Nielsen c0d2671872 Make it clear that you are not allowed to have spaces in operator-names.
Remove places where you were technically allowed to add spaces between
individual characters, but no implementation actually allowed it.

Change-Id: I0a13c9e3995b897135cd578a7d8c114f7746f991
Reviewed-on: https://dart-review.googlesource.com/34640
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-01-16 09:34:41 +00:00
Erik Ernst d830c8ba3c Removed merge conflict markers.
Change-Id: I1feda4f3104ca100425233fb7f339a412a885f9f
Reviewed-on: https://dart-review.googlesource.com/34743
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-01-15 21:21:20 +00:00
Lasse R.H. Nielsen 3727e4d28b Update specification of system/non-system import conflict to not cause warning.
Change-Id: I089561ce2770a12549476687bb0ef3d78f9cc1e1
Reviewed-on: https://dart-review.googlesource.com/33840
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-01-15 15:21:51 +00:00
Erik Ernst 673d5f0a66 Adding generic methods to the language specification.
Change-Id: I49404e81258fc688caef5c044ff70e52508a4423
Reviewed-on: https://dart-review.googlesource.com/14525
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-01-11 16:15:58 +00:00
Erik Ernst 38dcb10543 Clarified that non-abstract noSuchMethod counts more than abstract.
Change-Id: Ic8e6fc0c43267239d385b451c571c8a4ce9340b3
Reviewed-on: https://dart-review.googlesource.com/32763
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-01-11 13:13:38 +00:00
Erik Ernst af430f37a8 Added informal specification of super-bounded types.
Change-Id: I4764faa8250af61bf8cda9cf6a854e2bd7d726f2
Reviewed-on: https://dart-review.googlesource.com/14042
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-01-11 09:16:11 +00:00
Erik Ernst dd3f935cf5 Now specifying void return type for setters and operator []=
Change-Id: Id2e8b3314eb5bba4ebf82286c0f8228db2235af0
Reviewed-on: https://dart-review.googlesource.com/32603
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-01-08 12:38:22 +00:00
Lasse Reichstein Holst Nielsen d7e50427b3 Change wording on main functions.
Change-Id: Ib61178a8b3c4f2adfa994d00e24b3320fd7f9cfc
Reviewed-on: https://dart-review.googlesource.com/25400
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-12-19 11:54:22 +00:00
Lasse Reichstein Holst Nielsen 90dc2101a6 Update FutureOr for Dart 2.
Change-Id: Ic12f3dfa558ff34f90a64724658c572942e77c9f
Reviewed-on: https://dart-review.googlesource.com/25301
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2017-12-07 19:36:42 +00:00
Erik Ernst a6d422957d Adjusted nosuchmethod-forwarding.md
This CL changes said document to drop support for requested generation
of forwarder in case of a conflict. Developers must then write a
disambiguating method implementation themselves.

Note that this is what we already agreed during discussions about
this feature, but I noted that it hadn't yet been written into the
document.

Also changes the status to 'under implementation'.

Change-Id: I31b3dd8d65438484824225ad7067d36462d26aa7
Reviewed-on: https://dart-review.googlesource.com/22421
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-12-01 12:39:19 +00:00
Erik Ernst db383f64ad Fixed many whitespace issues in dartLangSpec.tex
In dartLangSpec.tex there used to be many white space anomalies, e.g.,
double  spaces  between words with no apparent justification


or multiple empty lines
  or lines starting with indentation that wasn't justified by any
consistent rule that I could spot.

This CL fixes that.

It also adjusts the grammar rules to be formatted in a systematic way
which will be helpful for an update to use something else than
bnf.sty (that we can't distribute due to license problems).
In particular, when a right hand side is too long for one line it used
to flow into the next line just like text (so non-terminals would have
`-` inserted at locations where a natural language algorithm thought
the "word" could be split in two, and the indentation on the next line
was nonsensical). So now it uses `\gnewline{}` ("grammar newline") to
switch to a new line and indent somewhat. It also uses `\gcomma{}` to
produce a quoted comma (which otherwise looks funny, because the `,'
becomes more like `,  ' because the comma has a sort of built-in space
after it).

The command `\cd{...}` is gone and `\code{...}` is used everywhere.

Every sentence is now terminated by a newline. This doesn't mean that
every line is <80 chars, but it is at least much more readable (in
an editor whose window is really big), and it's consistent with the
more radical changes that we have made whenever we have made bigger
changes to a paragraph.

Finally, all comments on interface injection and all comments on
spread and rest arguments have been deleted. These comments contained
considerations about said features, but they did not contribute to
the discussions that we have had about the same or similar topics
(in particular because the comments relied on assumptions that do
not hold any more).

So it's a big diff, but a huge portion of it is white space fixes,
and the rest is very systematic. So it should be bearable, and we
would surely need to do the same things over time, otherwise.

Change-Id: Ia5922c22cb496792d394e76ce8c7bca7df1b4cc8
Reviewed-on: https://dart-review.googlesource.com/25000
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-12-01 09:44:18 +00:00
Lasse Reichstein Holst Nielsen 7f89be22aa Make the *flatten* function not be recursive.
Update `return e;` in `async` function to do an implicit await if the value is async.
(We can make it an explicit await that also waits if it's not a future).

Make it explicit that we don't allow two different instantiations of the same interfaces.

Change-Id: I66de9ec55c1d55523d91e6d2bbebcb7d02ef301f
Reviewed-on: https://dart-review.googlesource.com/23663
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2017-11-30 22:10:26 +00:00
Florian Loitsch 1d9438ed0d Newsletter 2017-11-24.
Change-Id: Iea1fe57c076d978b6e9308b07d2479a856729ee9
Reviewed-on: https://dart-review.googlesource.com/23620
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-24 16:27:00 +00:00
Erik Ernst 062e5d6db3 Now explicitly defines variant occurrences of type parameters.
The discussion about SDK issue 31305 showed that the definition of
covariant/contravariant/invariant occurrences need to be given
somewhere, and also that covariant-from-class.md is a reasonable place
to put it.

This CL adds those definitions there, based on Leaf's proposal in the
above-mentioned issue, and adjusts the definition of what it means to
be a covariant parameter such that the case where the relevant type
parameter occurs in the bound of a formal type parameter in a function
type is taken into account.

(It also reformats the document to stay within 80 columns and follow
the style of newer informal specs more closely, but that should be
easy to skip over because Gerrit colors white space changes
differently from "real" changes).

Change-Id: I0b0a688c616d0bb56755ceea08e1792abfa7936d
Reviewed-on: https://dart-review.googlesource.com/23422
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-11-24 09:21:47 +00:00
Kevin Millikin 9f19d1e30a Be consistent about use of null in the spec
The spec would sometimes use the reserved word (boldface) null, which
is an expression, when it really meant the value of that expression.
Since that value has a defined name, "the null object", use it
correctly and consistently.

The spec would also use the phrase "the null value", which presumably
just meant the null object.  Replace occurrences of this phrase with
"the null object".

Bug:
Change-Id: Ibadeb97fe3bec67cd77d6a8d6c57e922cea265d3
Reviewed-on: https://dart-review.googlesource.com/22461
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2017-11-21 15:42:48 +00:00
Kathy Walrath 80a5f92caf Add a bit more info about the newsletters.
Change-Id: I1037d4313b7da9773dd818eb4618fc09d44f12cc
Reviewed-on: https://dart-review.googlesource.com/21784
Reviewed-by: William Hesse <whesse@google.com>
2017-11-17 23:41:15 +00:00
Erik Ernst 9bd60376ef Clarified examples in covariant-from-class.
Change-Id: I6bbf51b7f3c5fd46d8ce59e860cf615e26308560
Reviewed-on: https://dart-review.googlesource.com/21346
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2017-11-16 13:25:52 +00:00
Erik Ernst ba77483022 Adjusted def. of "a superclass" in the language specification.
Cf. SDK issue 25839.

Change-Id: I41aaecdb206c599f0deca6facb074c8d4f960529
Reviewed-on: https://dart-review.googlesource.com/21347
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2017-11-16 13:01:42 +00:00
Erik Ernst f68e5231b4 Renewed tests from built_in_identifier_prefix
The test language_2/built_in_identifier_prefix_test stated 'it is not
illegal to use a built-in identifier as a library prefix', which has
been untrue for quite a while, and then proceeded to check a number of
cases where said situation was used in practice. All of that is now
obsolete, so that test was split into several tests, each of which was
adjusted to test something which is relevant today.

The new tests include checks for the use of "known" identifiers (such
as `of`, `show`, `on` and a few more) which are mentioned explicitly
in the grammar, but which are neither built-in identifiers nor
reserved words.

The new tests gave rise to a number of status entries, including 25
crashes (so it is not just "expect `MissingCompileTimeError` here
because it's not strong mode").

Note that `Function` is considered to be a built-in identifier.
This makes no difference for the grammar, but it means that there
are no cases where `Function` is used as a library prefix.

If we insist that `Function` cannot be a built-in identifier then
we just need to add a few more grammar rules to all such things as
`import .. as Function;`, but I considered it less confusing to
include `Function` among the built-in identifiers and avoid adding
support for this.

Note that we haven't said anywhere that `Function` is a built-in
identifier, so we would need to adjust an informal/*.md file to say
that, to finish this off.

Change-Id: Ifa5bbd95022498480b7ee2e94605f81cd11d9696
Reviewed-on: https://dart-review.googlesource.com/21080
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2017-11-16 12:34:14 +00:00
Kevin Millikin d66ee882d3 Be consistent about run time and compile time
The spec was not self-consistent with respect to the usage of various forms
of 'run time' and 'compile time', even when using them as formally defined
terms (e.g., compile-time error).

Consistently follow the conventions: that 'run-time' and 'compile-time' are
adjectives and not nouns; that 'run time' and 'compile time' are noun
phrases containing an adjective and not adjectives themselves; and that
'runtime' and 'compiletime' are nonsense or at least jargon and are avoided.

Fixes https://github.com/dart-lang/sdk/issues/25883

Bug:
Change-Id: I0a9eb524bb43ed6c3a74e6ef038184bcbe979966
Reviewed-on: https://dart-review.googlesource.com/21345
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2017-11-16 12:01:42 +00:00
Kathy Walrath 28e0c35ef8 Create newsletter index (#31340)
* Create newsletter index

* Simplify links, add a few line breaks

* Add 20171110.md

* Tweak library doc entry
2017-11-13 16:26:44 -08:00
Florian Loitsch 145c9a5d56 Newsletter 2017-11-10.
Change-Id: Ibecaf1e42105093193897e2ee57ed24d34c5e7b8
Reviewed-on: https://dart-review.googlesource.com/20200
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-10 18:09:30 +00:00
Erik Ernst 1c4358d459 Adjusted spec to not warn if instance method "overrides" static method
Addresses SDK issue #31201.

Change-Id: I545004b5e6e20b82ae4db879bb8f07adae1ecd23
Reviewed-on: https://dart-review.googlesource.com/18801
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2017-11-10 14:52:09 +00:00
Erik Ernst 57d00dfcb2 Made namedParameterTypes in the spec grammar more strict
In the specification grammar docs/language/Dart.g, named parameters in
a new style `Function` type must now have a type. They used to support
a plain `identifier` form, which means that the type was omitted and
only the name given, but the informal spec did not allow this (and this
was a decision taken because we wanted to take a step towards the kind
of function types where it is always the name which is omitted if
anything is omitted, and this means that nothing can be omitted for a
named parameter).

Change-Id: Ib2538f5bafd1e044f0b4f22ea0a6b9a339f81501
Reviewed-on: https://dart-review.googlesource.com/19567
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2017-11-10 11:08:17 +00:00
Erik Ernst 40b6741778 Adds support for syntax error in tests to test.py.
This CL modifies the Dart source used from test.py such that it takes
`syntax error` into account as an expected outcome in test files (so
that we can have `//# 01: syntax error` with a similar meaning as
`//# 01: compile-time error`).

For all tools except the spec_parser, `syntax error` is the same
outcome as `compile-time error`; that is, nobody else will see the
difference.

For the spec_parser, `syntax error` is the outcome where parsing has
failed; `compile-time error` is taken to mean some other compile-time
error, i.e., the spec_parser is expected to _succeed_ when the
expected outcome is `compile-time error`.

Test files in language and language_2 have been adjusted to use the
outcome `syntax error` where appropriate.

The status files in language and language_2 for the spec_parser have
been adjusted such that they fit all the new `syntax error` outcomes
in test files.

Other status files have been adjusted in a few cases where tests were
corrected (because a compile-time error which was clearly not intended
to be a syntax error turned out to be caused by a typo, which means
that the actual compile-time error has never been tested).

The spec grammar Dart.g was adjusted in a few cases, when some bugs
were discovered. In particular, the treatment of Function has been
changed: It is now known by the parser that Function does not take
any type arguments. This makes no difference for developers, because
they cannot declare a type named Function anyway, but it means that
a number of tricky parsing issues were resolved.

Dart.g was also adjusted to allow `qualified` to contain three
identifiers, which is an old bug (preventing things like metadata on
the form `@p.C.myConst`).

Change-Id: Ie420887d45c882ef97c84143365219f8aa0d2933
Reviewed-on: https://dart-review.googlesource.com/18262
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-11-06 08:56:09 +00:00
Florian Loitsch 4528eb32a0 Newsletter 2017-11-03.
Change-Id: I5adca1c6706d00ff074656b39d561a0497fb8717
Reviewed-on: https://dart-review.googlesource.com/18660
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-03 21:05:36 +00:00
Florian Loitsch 0407c94349 Fix obsolete comment change in libs document.
"DateTime.parse taking optional arg".

Change-Id: I67779495a946789ba71ff1dffcdb8089a14f8073
Reviewed-on: https://dart-review.googlesource.com/18182
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-02 09:37:37 +00:00
Florian Loitsch 7517d24f44 Fix typo in lib document.
Change-Id: Ia6c3b545c53a9604a3fe670ef232a6033d74c1ef
Reviewed-on: https://dart-review.googlesource.com/17223
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-10-30 15:22:38 +00:00
Florian Loitsch cfab55800c Add replay named argument.
Change-Id: I7678bb372b2e6fcc6db995aa663b4217ab00cf8b
Reviewed-on: https://dart-review.googlesource.com/17200
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-10-30 13:59:51 +00:00
Florian Loitsch e6f5588b6c Fix missing "is".
Change-Id: I22b687c4d33d8411c269bb3612708ba378cf24f7
Reviewed-on: https://dart-review.googlesource.com/17100
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-10-28 13:48:30 +00:00
Florian Loitsch 457a7b0799 Small typos in lib document.
Change-Id: Ia334ed596a82c288cb0d207fc4c7408e80b96caf
Reviewed-on: https://dart-review.googlesource.com/17082
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-10-28 02:14:09 +00:00
Florian Loitsch 504d9d5783 Resize svgs.
Change-Id: I1602b83372b7e81106aa5dd57362e8486d74b747
Reviewed-on: https://dart-review.googlesource.com/17081
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-10-28 02:05:03 +00:00