Commit graph

375 commits

Author SHA1 Message Date
Florian Loitsch
7c1af28ddb Add Int 64 proposal.
Change-Id: I4e9b4dc72efe9159dbe5f922893776fc282cf7ef
Reviewed-on: https://dart-review.googlesource.com/8560
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-09-28 09:14:04 +00:00
Roel Spilker
ebbb0be021 Fix typos
substle => subtle, added missing backtick after </footnote>

Change-Id: Icc43cf01701074ecc692bc4827a4320fb580fca5
Reviewed-on: https://dart-review.googlesource.com/8180
Reviewed-by: William Hesse <whesse@google.com>
2017-09-25 16:43:15 +00:00
Florian Loitsch
415a6e2a75 Fix typo in newsletter.
Change-Id: Ieaa7c8fd6c9018d831e26db594aa5707c014625c
Reviewed-on: https://dart-review.googlesource.com/8021
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-09-25 08:19:43 +00:00
Florian Loitsch
57cc185366 Newsletter 2017-09-22.
Change-Id: I4586a9ebbee94bfa1dba48d0a826247f57d4fd9f
Reviewed-on: https://dart-review.googlesource.com/7702
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-09-22 13:07:38 +00:00
Erik Ernst
c49cbae7f0 Rietveld 2688903004 (spec_parser) migrated to Gerrit.
Change-Id: Iddd1e8a795bfaed0092a30bb9d83070fe62d4a60
Reviewed-on: https://dart-review.googlesource.com/7261
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-09-21 09:36:10 +00:00
Erik Ernst
8562c8ff1b Adjusted spec of initializing formal type annotation
During migration of lib/mirrors/initializing_formals_test.dart to lib_2
it became apparent that strong mode makes it an error to have different
type annotations on an initializing formal and the corresponding field.
The language team discussed this and decided that we will take a middle
way: These type annotations can differ, but the initializing formal
must have a subtype.

This CL adjusts the spec to say that. In line with the rest of the
spec it is still a static warning (we will migrate all the static
warnings to errors as a separate step).

Change-Id: I66656c2933b7f86b78f0b06eadbf5edc0f58a3c6
Reviewed-on: https://dart-review.googlesource.com/7264
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2017-09-20 11:38:26 +00:00
Lasse R.H. Nielsen
1d9ed20e06 Add >>> operator to specification.
Change-Id: Icade60331f708f895906dad9445878c6f32f9131
Reviewed-on: https://dart-review.googlesource.com/6621
Reviewed-by: Florian Loitsch <floitsch@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2017-09-20 07:51:46 +00:00
Erik Ernst
c15eed1269 Added metadata to new function type syntax parameter specifications
In https://github.com/dart-lang/sdk/issues/30732 the concern was raised
that the new Function type syntax does not support metadata on
parameter specifications (i.e., on normalParameterTypes and on
namedParameterTypes).

The implication of adding support for metadata in these locations is
that `@required` can be used on function types, which is the motivation
for submitting 30732.

We have always had support on parameter declarations in function typed
parameter declarations (`void foo(@A() int f(@A() String s))`), so in
this sense there is no new semantics to worry about (Lasse: "it doesn't
mean anything anyway!").

This CL modifies the generic-function-type-alias.md informal spec to
include this kind of metadata support.

Change-Id: I4520d330458242b31c991f62c03ca2f34f9c5e54
Reviewed-on: https://dart-review.googlesource.com/5762
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-09-18 09:31:08 +00:00
Lasse R.H. Nielsen
c620e827b7 Don't say that the Invocation object of setters/getters returns const map/list.
Currently the spec says that namedArguments of, say, a setter Invocation must
return the `const{}` map. That's badly typed for Dart 2(it should at least
be `const <Symbol,Object>{}`) and unnecessarily specific.
This change just requires the object to be empty and unmodifiable.

Also remove the spec handling invalidly overridden noSuchMethod.
That's not longer possible in Dart 2.

Change-Id: I3a983a44dd5939e42c85a53e9769f5961e03b986
Reviewed-on: https://dart-review.googlesource.com/6462
Reviewed-by: Erik Ernst <eernst@google.com>
2017-09-18 08:06:28 +00:00
Florian Loitsch
5f11c123d4 Incorporate Lasse's comments.
Change-Id: I4906660337dc440fd1bbc2e39b656bd2c1e1ba91
Reviewed-on: https://dart-review.googlesource.com/6320
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-09-15 21:19:01 +00:00
Florian Loitsch
dfbd0570b4 Newsletter 2017-09-15.
Change-Id: I6a76a96975a1bfb36fa62fa887e1f7d922aadd1f
Reviewed-on: https://dart-review.googlesource.com/6300
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-09-15 20:41:41 +00:00
Florian Loitsch
10783d28f2 Newsletter 2017-09-08.
Change-Id: I22a5d094d1af4c78a78f48694c6b110956633368
Reviewed-on: https://dart-review.googlesource.com/4560
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-09-08 19:34:22 +00:00
Lasse Reichstein Holst Nielsen
06f2a2eead Remove @proxy from the specification. Deprecate the annotation.
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/3007853003 .
2017-09-04 07:56:53 +02:00
Florian Loitsch
b74f7cdd86 Remove spurious "function that takes"
Fix the section on Fruit function vs apple function.
2017-09-02 20:58:08 +02:00
Florian Loitsch
b8a36a4887 Newsletter 2017-09-01.
Review-Url: https://codereview.chromium.org/3012723002 .
2017-09-01 22:47:20 +02:00
Erik Ernst
839c321608 Generalized void informal spec clarified in several locations.
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2994363003 .
2017-08-31 12:10:06 +02:00
Erik Ernst
00e98af7ef Adjusted the optional-const/new specs.
The informal specifications of optional-const and optional-new used to
be incomplete, and this CL adds missing parts (transformation rules for
lists and maps, and for `assignableExpression`).

This version of the documents preserves the property that no `const` is
added without immediate syntactic justification.

The alternative (where `const` is used also in other contexts where
either `const` or `new` must be added, just because we can do that)
is not specified here, that'll be another CL. The corrections done in
this CL will be needed, anyway, so I separated the two.

R=lrn@google.com

Review-Url: https://codereview.chromium.org/3005833002 .
2017-08-30 18:53:43 +02:00
Florian Loitsch
8482c00ec3 Newsletter 2017-08-25.
Review-Url: https://codereview.chromium.org/3003893002 .
2017-08-25 17:24:27 +02:00
Lasse Reichstein Holst Nielsen
3744197e3c Specify what "is equivalent to" means.
R=eernst@google.com

Review-Url: https://codereview.chromium.org/2998173002 .
2017-08-22 07:35:23 +02:00
Erik Ernst
6ef388db9d Added static warning on assignment to final locals; adjusted for-in.
Addresses spec omission which was brought up in SDK issue #30483.

The following issue was created specifically on this topic: #30489.

R=lrn@google.com

Review-Url: https://codereview.chromium.org/2998073002 .
2017-08-21 09:29:17 +02:00
Florian Loitsch
e6e8d35323 Newsletter 2017-08-18.
Review-Url: https://codereview.chromium.org/3001943002 .
2017-08-18 18:25:48 +02:00
Lasse R.H. Nielsen
2170830a9e Specify that async functions start executing synchronously.
R=eernst@google.com

Review-Url: https://codereview.chromium.org/3000063002 .
2017-08-18 13:00:40 +02:00
Erik Ernst
6fc097670c Added informal spec of optional const/new to docs/language/informal.
R=lrn@google.com

Review-Url: https://codereview.chromium.org/3000133002 .
2017-08-17 11:33:04 +02:00
Erik Ernst
8514557c5a Removed permission to do voidExpression is T and .. is! T.
The informal spec of generalized void used to allow a `typeTest` on
an expression of type void. This CL removes that permission, thus
leaving only `as` as a narrow escape hatch from void, as decided at the
language team meeting on 2017-08-15.

R=lrn@google.com

Review-Url: https://codereview.chromium.org/3001063002 .
2017-08-17 11:31:31 +02:00
Kevin Moore
88706d8813 Tiny nit to 20170811 newsletter (#30460) 2017-08-16 11:37:01 -07:00
Florian Loitsch
1daab67666 Newsletter 2017-08-11
Review-Url: https://codereview.chromium.org/3000793002 .
2017-08-11 17:33:00 +02:00
Lasse Reichstein Holst Nielsen
e329e1ce29 Don't allow function values in assert tests.
Currently you can write
  assert(() { ... });
and the function will be called and the return value used as the assert test.
This feature isn't really worth its own complexity - if you want to get the same effect, you can just write all the function:
  assert(() { ... }());
With asserts in const initializer lists, where the function call is not possible anyway, the feature went from being not very useful to being actual an complication and exception for users to remember.

R=eernst@google.com, rnystrom@google.com

Review-Url: https://codereview.chromium.org/2974763002 .
2017-08-10 15:29:55 +02:00
Erik Ernst
db092ff2fc Transferred the generalized void informal spec to docs/language/informal
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2994003002 .
2017-08-09 16:30:59 +02:00
Florian Loitsch
d94cecba3c Newsletter 2017-08-04.
Review-Url: https://codereview.chromium.org/2995543002 .
2017-08-04 19:06:10 +02:00
Florian Loitsch
941c07db5c Add first newsletter.
Review-Url: https://codereview.chromium.org/2989963002 .
2017-07-28 21:31:00 +02:00
Erik Ernst
5904409d50 Added informal generic method syntax and generic function type specs.
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2841483003 .
2017-07-14 13:17:30 +02:00
Erik Ernst
52e1372454 Fixes several typos as reported by Alexander Aprelev in
https://codereview.chromium.org/2844003002/, plus other typos.

R=lrn@google.com

Review-Url: https://codereview.chromium.org/2975283002 .
2017-07-14 12:51:28 +02:00
Lasse R.H. Nielsen
a72f46def8 The actual change to the wording of assert that I intended in the previous CL.
R=eernst@google.com

Review-Url: https://codereview.chromium.org/2979523002 .
2017-07-11 11:52:21 +02:00
Lasse R.H. Nielsen
609d26a227 Add assert-in-initializer-list to formal specification.
Add tests for new syntax.
Not dart-formatted yet since the formatter doesn't accept the new syntax.

R=eernst@google.com, floitsch@google.com

Review-Url: https://codereview.chromium.org/2962153002 .
2017-07-10 13:59:38 +02:00
Florian Loitsch
4207a070f1 Fix indented ```. 2017-06-30 20:39:56 +02:00
Lasse R.H. Nielsen
aeacff4f2b Add proposal for new mixin declaration syntax.
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2954653002 .
2017-06-30 14:16:57 +02:00
Lasse Reichstein Holst Nielsen
380461e61a Improve wording of break/continue.
R=eernst@google.com, kmillikin@google.com

Review-Url: https://codereview.chromium.org/2963533002 .
2017-06-28 07:37:14 +02:00
Lasse Reichstein Holst Nielsen
82a97d8b46 Fix wording for break and continue.
Fixes #30011
BUG= http://dartbug.com/30011
R=eernst@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2961603002 .
2017-06-27 10:33:24 +02:00
Lasse R.H. Nielsen
c68e5cc67d Allow trailing comma in assert statements.
Fixes #28786
BUG= http://dartbug.com/28786
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2953223002 .
2017-06-23 14:45:25 +02:00
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
Lasse R.H. Nielsen
04a470e636 Spec: Allow any expression in assert statements.
Fixes issue #26866

BUG= http://dartbug.com/26866
R=eernst@google.com, floitsch@google.com

Review URL: https://codereview.chromium.org/2143363002 .
2016-08-15 11:57:51 +02:00
Lasse R.H. Nielsen
4f9645c406 Add trailing commas to argument and parameter lists.
R=eernst@google.com

Review URL: https://codereview.chromium.org/2060163002.
2016-07-06 15:17:46 +02:00
Lasse R.H. Nielsen
65421fb2bf Various fixes to wording and typos.
R=eernst@google.com

Review URL: https://codereview.chromium.org/2060773002.
2016-06-14 15:55:06 +02:00
Harry Terkelsen
1745ba77f5 fix all instances of "the the"
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1980573003 .
2016-05-13 12:38:25 -07:00
Lasse R.H. Nielsen
2a0cc74db1 Expand the definition of potentially constant expression.
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 .
2016-01-20 13:21:39 +01:00
Lasse R.H. Nielsen
fd59c87146 Make ?? a compile-time constant operator.
Update specification, change analyzer, VM and dart2js.

Fixes issue #25054.
BUG= http://dartbug.com/25054
R=floitsch@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org/1493693002 .
2016-01-12 12:30:07 +01:00
Gilad Bracha
a0e4f28160 Unnamed libraries do not cause warnings.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1299283002 .
2015-08-19 13:21:29 -07:00
Gilad Bracha
b11670f899 Ensure null aware ops on statics are unsurprising.
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1218483004.
2015-06-29 15:33:06 -07:00
Gilad Bracha
4fb7507c3e Remove mixin DEP annotation from header
BUG=

Review URL: https://codereview.chromium.org//1202733006.
2015-06-24 12:40:08 -07:00
Gilad Bracha
2c7234bd61 Mixin DEP changes
BUG=
R=eernst@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//1190453003.
2015-06-24 12:33:18 -07:00
Gilad Bracha
d8b47ad0a6 Added language spelling out static type of prefix objects
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1195133002.
2015-06-23 11:41:35 -07:00
Kevin Millikin
2e5a132fe1 Fix a typo in the specification of switch cases.
In the grammar, labels must before the word 'case'.  However, in the
description the labels come between the word 'case' and the comparison
expression.  Closes #22127.

BUG=
R=gbracha@google.com

Review URL: https://codereview.chromium.org//1189523004.
2015-06-16 12:02:16 +02:00
Gilad Bracha
f71b48a041 Revise static typecheck rules for for-in.
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1184183010.
2015-06-15 17:50:37 -07:00
Gilad Bracha
b34c19d0ce Add missing clause for LUB(Bottom, T)
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1179113010.
2015-06-15 16:20:30 -07:00
Gilad Bracha
1ab7736b57 Added type rules for e++ and friends
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1183493005.
2015-06-15 15:00:55 -07:00
Gilad Bracha
2b95ed1ae1 Make use of call on Function exempt from warnings,
BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1176853003.
2015-06-15 13:24:10 -07:00
Gilad Bracha
67b99e4b33 Make sure we use lexical scope consistently when dealing with prefixes.
BUG=
R=lrn@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1184583002.
2015-06-12 17:38:42 -07:00
Gilad Bracha
58708e3ad1 Specify behavior of e?.v++ and e?.v--
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1181733003.
2015-06-11 15:01:06 -07:00
Gilad Bracha
c448d7fb0b Make package: URI schema implementation dependent per latest DEP.
BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1170393002.
2015-06-10 12:36:31 -07:00
Gilad Bracha
89607f06e9 Updates for 1.10: warnings when for-in uses an expression that has no iterator; assorted typos.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1171283002.
2015-06-09 15:44:31 -07:00
gbracha@google.com
099e37e003 Changes for TC52 3rd edition
R=eernst@google.com

Review URL: https://codereview.chromium.org//1031323002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44726 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 01:45:31 +00:00
gbracha@google.com
ae83a06400 Assorted fixes to async: yield may suspend in async* methods; yield* skips emptysequences; definition of flatten.
R=hausner@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1010433002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44569 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-18 23:18:06 +00:00
gbracha@google.com
e259e8f86f Correct reference to definition of flatten
Review URL: https://codereview.chromium.org//993213002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44391 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 00:59:51 +00:00
gbracha@google.com
c82a633c65 Strengthen warnings for return types of async/async*/sync* functions.
R=paulberry@google.com

Review URL: https://codereview.chromium.org//891303004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43420 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 19:06:09 +00:00
gbracha@google.com
609e6ebb66 Clarify behavior of iterables and iterators with sync*.
R=lrn@google.com

Review URL: https://codereview.chromium.org//858063002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43415 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 18:19:11 +00:00
gbracha@google.com
dff3b74a05 Remove restrictions on scope of doc comments.
R=sethladd@google.com

Review URL: https://codereview.chromium.org//843013003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42940 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 23:51:50 +00:00
gbracha@google.com
1bc0e8dc1d insure type vars are bound properly when executing field initializers. Also correct assoc tablefor ?:
R=lrn@google.com

Review URL: https://codereview.chromium.org//811953006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42785 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 18:52:14 +00:00
gbracha@google.com
8672603473 Fix name of spawnIsolate to spawn.
Review URL: https://codereview.chromium.org//808373003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42560 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-23 00:23:31 +00:00
gbracha@google.com
73de52110f Correct last revision
Review URL: https://codereview.chromium.org//825463002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42554 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-22 19:51:21 +00:00
gbracha@google.com
509c16c9cb Fix error in grammar for assignableExpression
Review URL: https://codereview.chromium.org//817723003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42553 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-22 19:06:55 +00:00
gbracha@google.com
0faaa550d1 Fix circular dependency between null equality and identity.
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//804993005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42552 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-22 18:58:06 +00:00
gbracha@google.com
38606de2a5 Change static typing so that inherited noSuchMethod silences errors,
including undefined abstract members.

R=justinfagnani@google.com

Review URL: https://codereview.chromium.org//818463002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42521 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 18:44:39 +00:00
gbracha@google.com
11db20e680 Main function of a script can be function valued getter.
R=lrn@google.com

Review URL: https://codereview.chromium.org//800413003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42464 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-18 18:55:30 +00:00
eernst@google.com
93f4f00719 Working insertion of hash values; added a few labels in spec
Hash values are now computed for each "paragraph" starting with \LMHash
(which includes subsequent grammar, dartCode, itemize blocks, but stops
at \section-like commands).  Now addlatexhash.dart expects three arguments
(first the source latex file, then the destination simplified and
hash-value-annotated latex source file, and finally a file name used to
create the list of hash values emitted).  Adjusted testing accordingly.
Added a test for robustness of the hash value generation: It is checked
that lots of different "unimportant" changes make no difference for the
generated hash values (e.g., we can add/remove comments, change white
space, add \commentary{..} etc. without changing the hash values).

In order to ensure that all "structure" commands in the spec have a label,
I added an \LMLabel{..} a handful of places, following the style which is
used throughout the spec.

In dart.sty, the \renewcommand that made \LMHash{} produce a fixed
hash value has been removed such that the actual hash values are now
inserted into the generated spec PDF/DVI file.  Tests have been adjusted
to handle this difference between the spec with and without hash values
when comparing the two.

R=gbracha@google.com, lrn@google.com, ricow@google.com

Committed: https://code.google.com/p/dart/source/detail?r=41658

Reverted: https://code.google.com/p/dart/source/detail?r=41662

Review URL: https://codereview.chromium.org//652993005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41687 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 08:41:55 +00:00
eernst@google.com
36122ae11f Recovered \LM.. commands
Recovered the \LM.. commands inserted in order to support SHA1 hash value
markers on spec paragraphs; also recovered a couple of changes directly
required for the \LM.. commands to work.

Review URL: https://codereview.chromium.org//722573003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41686 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 08:27:43 +00:00
eernst@google.com
4074b50818 Revert "Working insertion of hash values; added a few labels in spec"
This reverts commit r41658.

Review URL: https://codereview.chromium.org//714883002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41662 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 11:39:40 +00:00
eernst@google.com
9570a582eb Working insertion of hash values; added a few labels in spec
Hash values are now computed for each "paragraph" starting with \LMHash
(which includes subsequent grammar, dartCode, itemize blocks, but stops
at \section-like commands).  Now addlatexhash.dart expects three arguments
(first the source latex file, then the destination simplified and
hash-value-annotated latex source file, and finally a file name used to
create the list of hash values emitted).  Adjusted testing accordingly.
Added a test for robustness of the hash value generation: It is checked
that lots of different "unimportant" changes make no difference for the
generated hash values (e.g., we can add/remove comments, change white
space, add \commentary{..} etc. without changing the hash values).

In order to ensure that all "structure" commands in the spec have a label,
I added an \LMLabel{..} a handful of places, following the style which is
used throughout the spec.

In dart.sty, the \renewcommand that made \LMHash{} produce a fixed
hash value has been removed such that the actual hash values are now
inserted into the generated spec PDF/DVI file.  Tests have been adjusted
to handle this difference between the spec with and without hash values
when comparing the two.

R=gbracha@google.com, lrn@google.com, ricow@google.com

Review URL: https://codereview.chromium.org//652993005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41658 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 10:08:12 +00:00
gbracha@google.com
27db1ea7af orrect cut/paste error that replicated an item in the list of constants and (worse) deleted another.
Review URL: https://codereview.chromium.org//715653003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41647 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 20:23:06 +00:00
eernst@google.com
bf339367c3 Introduced hash valued location markers in the spec
Introduced support for adding SHA1 hash valued location markers
at several levels in the language specification, added long explanatory
comment at the end, added a script 'addlatexhash.dart' to normalize
spacing, remove comments, etc., in the spec, such that the hash values
are more robust than they would be with a direct usage of the spec.

The script passes the "dvi2tty test", that is, when the location markers
are empty, the resulting *.dvi files created from dartLangSpec.tex and
from the version processed by the script give rise to the same text via
dvi2tty, i.e., the script does not destroy the spec.

R=gbracha@google.com, ricow@google.com

Review URL: https://codereview.chromium.org//646003002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41191 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-20 14:02:23 +00:00
gbracha@google.com
3f7b6cf6a0 Fix typos due to TeXShop quote (mis)processing
R=eernst@google.com

Review URL: https://codereview.chromium.org//639953003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41078 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-13 17:12:08 +00:00
gbracha@google.com
8080adfa27 Added missing keywords for async etc.
R=eernst@google.com

Review URL: https://codereview.chromium.org//635913002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40992 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-08 15:55:04 +00:00
eernst@google.com
422284dc73 Await always awaits
Fetched from https://codereview.chromium.org/572283003/
and committed to resolve commit issue for Gilad Bracha

Review URL: https://codereview.chromium.org//575413002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40427 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 09:09:55 +00:00
gbracha@google.com
6a6b49775d async/await, async*, sync* and yield
Review URL: https://codereview.chromium.org//498873003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40052 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 20:51:31 +00:00
gbracha@google.com
b55e02f083 Add enums to the main grammar entry point.
Review URL: https://codereview.chromium.org//493453003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39386 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:53:33 +00:00
gbracha@google.com
60f5a0c18d Enums.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//483873002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39385 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:39:45 +00:00
gbracha@google.com
f9ccd0d318 Clarify that prefixes may not be built-in identifers
R=kustermann@google.com

Review URL: https://codereview.chromium.org//415333003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38567 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-25 00:49:05 +00:00
gbracha@google.com
b500b5333a Change rules so prefixes obey lexical scope. Do this by basing member access on objects uniformly.
R=lrn@google.com

Review URL: https://codereview.chromium.org//396733003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38518 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 20:29:48 +00:00
gbracha@google.com
5dfa44d0a2 Explicitly specify what happens when noSuchMethod(x) is not found
R=lrn@google.com, regis@google.com

Review URL: https://codereview.chromium.org//389403002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38212 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 20:15:23 +00:00
gbracha@google.com
c85dae8a03 Rtrying change to make const classes finals constant
Review URL: https://codereview.chromium.org//387733003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38139 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 23:13:07 +00:00
gbracha@google.com
53f5ad1cd3 Integrated deferred loading into main spec.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//373333002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38091 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-09 17:19:51 +00:00
gbracha@google.com
12422f1083 Replace subtyping with << for function type emulation.
R=jwren@google.com

Review URL: https://codereview.chromium.org//372083002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38072 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-08 21:46:38 +00:00
gbracha@google.com
339513f7e3 Eliminate redundant condition for interface inheritance.
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//298803014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36579 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-23 18:36:26 +00:00
gbracha@google.com
6ef09c32dd main function may take an argument.
R=lrn@google.com

Review URL: https://codereview.chromium.org//280473004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36450 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-21 20:57:25 +00:00
gbracha@google.com
f9d663f190 Modify identity of NaNs so they are identical iff they are bit identical.
R=lrn@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//274963005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36187 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-14 20:06:21 +00:00
gbracha@google.com
2f93268ba1 ECMA modifications and minor fixes since.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//272723003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35928 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 18:23:07 +00:00
gbracha@google.com
926d5bb14b Clarify that dart system libs have lower priority regardless how imported.
R=johnniwinther@google.com, kasperl@google.com

Review URL: https://codereview.chromium.org//208293006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34378 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 18:15:48 +00:00
gbracha@google.com
80f6cd58e6 Ensure warnings are given on logical boolean expressions and for loops where booleans are expected but the type is not bool.
R=brianwilkerson@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//206883003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34260 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-21 17:42:02 +00:00
gbracha@google.com
78776f9781 Changes required for ECMA standardization, plus allow void in getter return type.
R=ahe@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//206743002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34201 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 20:23:43 +00:00
gbracha@google.com
325c2d8f53 Clarify inheritance rule so that warning is given if no suitable *concrete* method is declared yet the interface requires it.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//189163009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33498 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-10 17:24:42 +00:00
gbracha@google.com
708f25bdef Correct type rules following changes to getter behavior.
R=lrn@google.com

Review URL: https://codereview.chromium.org//186883003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33466 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 23:39:03 +00:00
gbracha@google.com
6d58ce9bfe Revise spec to agree with implementations for meaning of getter/variable and setter references. While the actual difference were only in a few odd cases, the new text should also be clearer.
R=hausner@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//177283007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33287 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 18:37:37 +00:00
gbracha@google.com
08eb68c466 Libraries can be private.
R=ahe@google.com

Review URL: https://codereview.chromium.org//165483004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33050 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-26 02:42:23 +00:00
rmacnak@google.com
fd3d616818 Minor spec typos.
R=gbracha@google.com

Review URL: https://codereview.chromium.org//157603005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32564 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-11 18:07:02 +00:00
gbracha@google.com
0e10e686fc Tweak text to clarify that using atype variable in an expression in a static method is a compile time error.
R=regis@google.com

Review URL: https://codereview.chromium.org//136473013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31940 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-18 00:16:11 +00:00
gbracha@google.com
39b5ace1f8 Clarified use of const in for-in loop is illegal.
R=srdjan@google.com

Review URL: https://codereview.chromium.org//140743006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31904 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-17 00:13:26 +00:00
gbracha@google.com
01e4d829f4 Correct oversight so that no warning is given if a class implements Function, has no call() method but declares its own noSuchMethod().
R=brianwilkerson@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org//137763002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31795 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-14 18:46:55 +00:00
gbracha@google.com
9cf58fbd7c Update spec version number to 1.1 for release.
Review URL: https://codereview.chromium.org//134523006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31715 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-10 22:08:23 +00:00
gbracha@google.com
49db6198af Clarify that part directives and headers can carry metadata.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//128613004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31622 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-08 19:31:22 +00:00
gbracha@google.com
55021ce277 Change specification of @proxy to be compatible with implemementation.
R=brianwilkerson@google.com, kasperl@google.com

Review URL: https://codereview.chromium.org//93153002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31433 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-02 22:14:50 +00:00
gbracha@google.com
be709f52ba Version 1.0. Mainly formatting corrections.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//70383005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30211 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-12 23:05:52 +00:00
gbracha@google.com
78fe144713 Update spec for 0.8: Malformed types cause runtime errors for as, is and catch clauses, as well as checked mode subtype tests. Scripts main must be in exported namespace of library (can be exported, but import alone is not enough). Document effect of @proxy on typechecking. Metadata cannot include types.
Review URL: https://codereview.chromium.org//54903010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29775 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 22:18:32 +00:00
gbracha@google.com
b2c1255be8 Clarify that sttaic getters that pair with instance setters cause warnings even if they are implicit and vice versa.
Review URL: https://codereview.chromium.org//42513003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29227 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 00:43:19 +00:00
gbracha@google.com
7ba09adde9 Revert setters for final variables.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//33893004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29131 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 21:54:53 +00:00
gbracha@google.com
413058d6a5 Correct rule for unqualified function invocations.
R=hausner@google.com

Review URL: https://codereview.chromium.org//33383002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28954 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 21:29:32 +00:00
gbracha@google.com
4e4087c426 Clarify that when a local variable hides a type before it is declared, it is stilla compile-time error, and that the VM has flexibility to report such errors at the declaration rather than the use.
R=hausner@google.com

Review URL: https://codereview.chromium.org//30123002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28896 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-18 23:11:58 +00:00
gbracha@google.com
47a546e035 Assert that override warnings for members for classes carry through to interfaces.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//27983002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28890 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-18 22:42:55 +00:00
gbracha@google.com
1b850dd4ff It's an error if to instantiate a subclass of a malbounded type,or a type variable.
R=regis@google.com

Review URL: https://codereview.chromium.org//26990005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28701 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 00:54:58 +00:00
gbracha@google.com
0d5b2c28ae Least upper bound fixes.
Review URL: https://codereview.chromium.org//27209004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28672 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:39:55 +00:00
gbracha@google.com
da96b74f08 Update spec to 0.7. Remove obsolete/redundant rules for local variable initialization. Remove restriction on const instance creation. Liberalize type promotion rules.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//27054005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28589 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 16:37:42 +00:00
gbracha@google.com
c33559c2e8 Update spec to 0.7. Remove obsolete/redundant rules for local variable initialization. Remove restriction on const instance creation.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//27054005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28552 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 20:56:55 +00:00
gbracha@google.com
df4b9e4a9c Make sure exports treat dart: libs specially just like imports.
R=ahe@google.com

Review URL: https://codereview.chromium.org//26768004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28540 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 19:13:06 +00:00
gbracha@google.com
65077b32f4 Slight rewording of compile-time errors for switch cases, for clarity. No semantic change.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//26650006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28418 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 21:17:24 +00:00
iposva@google.com
61f1c52eed - Fix typo in grammar.
R=gbracha@google.com

Review URL: https://codereview.chromium.org//26603003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28395 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 00:42:59 +00:00
gbracha@google.com
9ec531b2bb Allow distinction in typesetting between built-in identifierss and true keywords.
R=iposva@google.com

Review URL: https://codereview.chromium.org//26567004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28393 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 00:11:51 +00:00
gbracha@google.com
5a7f24cb61 Use more-specific instead of subtyping for type promotion; extend definition of more-specific to include function types so that the change works.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//26383002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28335 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 23:33:05 +00:00
iposva@google.com
59611b2414 - Add the language specification to the repository.
R=dgrove@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//26340005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28332 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 22:43:18 +00:00