Commit Graph

428 Commits

Author SHA1 Message Date
scheglov@google.com 2b9779fa27 Generate inferred types using all implemented interfaces.
R=brianwilkerson@google.com,pquitslund@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10541159

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8640 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 02:47:23 +00:00
zundel@google.com b6dbbbc0ec Disallow underscores in named formal parameters.
See issue http://code.google.com/p/dart/issues/detail?id=2493

Review URL: https://chromiumcodereview.appspot.com//10541095

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8631 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 22:30:16 +00:00
zundel@google.com ce34ba9949 Detect continue inside of case statement with no label
Review URL: https://chromiumcodereview.appspot.com//10536143

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8627 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 20:13:17 +00:00
brianwilkerson@google.com e66af0c36e Fix for 3607. This enables the use of the new getter/setter syntax but continues to accept the old syntax. Once the library code has been modified we can disable the old syntax.
Review URL: https://chromiumcodereview.appspot.com//10545159

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8618 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 16:51:24 +00:00
brianwilkerson@google.com 848682cbe8 Fix for issue 1781
Review URL: https://chromiumcodereview.appspot.com//10535148

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8616 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 16:08:43 +00:00
brianwilkerson@google.com 93717a5f2b Fix for issue 3526
Review URL: https://chromiumcodereview.appspot.com//10533127

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8615 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 16:00:34 +00:00
scheglov@google.com 930a2f9c46 Report error if typedef references itself in type parameter bounds
R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10546136

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8605 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 13:38:07 +00:00
zundel@google.com f52f8f68cf Fix for issue 1351 - Analyzer accepts non-multiline strings with newlines
Review URL: https://chromiumcodereview.appspot.com//10540133

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8601 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 10:50:21 +00:00
zundel@google.com 8eb0dd4fcf Fix for issue 2351 - checking assignability on top level getters and setters
Committed: https://code.google.com/p/dart/source/detail?r=8568

Review URL: https://chromiumcodereview.appspot.com//10548002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8588 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 23:07:00 +00:00
brianwilkerson@google.com 2c0466752b Fix for issue 1601
Review URL: https://chromiumcodereview.appspot.com//10533115

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8576 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:33:36 +00:00
zundel@google.com 33fda6f748 Revert "Fix for issue 2351 - checking assignability on top level getters and setters"
This reverts commit 16ef0be9ccae7d9991c37b8cd01295e6c62c6f6a.

Review URL: https://chromiumcodereview.appspot.com//10543122

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8574 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 20:58:31 +00:00
scheglov@google.com c88461077a Issue 3528. Additional checks for 'case expressions'
http://code.google.com/p/dart/issues/detail?id=3528

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10540114

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8573 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 20:21:34 +00:00
zundel@google.com 5255a46d70 Fix for issue 2351 - checking assignability on top level getters and setters
Review URL: https://chromiumcodereview.appspot.com//10548002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8568 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 19:42:32 +00:00
scheglov@google.com 462b64cb7f Attempt to fix build
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8565 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 19:07:00 +00:00
scheglov@google.com 405b72c292 Issue 3532. Report error if one unit included twice
http://code.google.com/p/dart/issues/detail?id=3532

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10532100

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8562 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 18:38:51 +00:00
scheglov@google.com 152a35d268 Issue 3534. It is a compile-time error if a typedef refers to itself
http://code.google.com/p/dart/issues/detail?id=3534

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10546118

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8561 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 18:31:57 +00:00
scheglov@google.com f50560b8ad Issue 3531. Don't allow using built-in identifier as import prefix
http://code.google.com/p/dart/issues/detail?id=3531

And couple other built-in/reserved issues.

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10545131

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8558 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 18:05:20 +00:00
scheglov@google.com c27fe9d3b1 Issue 3115. Fix for using getter as 'switch' expression
http://code.google.com/p/dart/issues/detail?id=3515

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10540104

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8556 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 16:49:06 +00:00
scheglov@google.com e7d6cec803 Fix for NPE when unresolved constructor used
R=pquitslund@google.com,brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10543087

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8502 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 16:08:57 +00:00
scheglov@google.com 089bc27a16 Issue 3340. conflict of a library prefix and a name in the importing library should produce a compile error
http://code.google.com/p/dart/issues/detail?id=3340

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10538077

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8500 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 16:01:21 +00:00
scheglov@google.com fea9c4703f Issue 3344. Support for 'U extends T' type variables
http://code.google.com/p/dart/issues/detail?id=3344

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10543089

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8498 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 15:59:01 +00:00
scheglov@google.com db90871bc7 Issue 3404. Static & top level functions are constant
http://code.google.com/p/dart/issues/detail?id=3404

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10542098

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8497 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 15:55:56 +00:00
scheglov@google.com 249ea57eed Issue 3426. Don't warn if superclass does not specify default parameter value
http://code.google.com/p/dart/issues/detail?id=3426

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10534084

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8496 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 15:53:50 +00:00
scheglov@google.com ede473a09d Issue 3449. Enable default values for parameters in abstract and interface methods
http://code.google.com/p/dart/issues/detail?id=3449

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10534082

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8494 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 15:51:51 +00:00
scheglov@google.com fe0261ee50 Issue 3477. Report error when built-in identifier used as type name
http://code.google.com/p/dart/issues/detail?id=3477

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10542094

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8493 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 15:49:30 +00:00
brianwilkerson@google.com 25b1e95d8d Fix for issue 1335
Review URL: https://chromiumcodereview.appspot.com//10539075

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8490 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 15:05:36 +00:00
scheglov@google.com 0ea17d1d3d Issue 3280. Fix for using function alias type as type variable bounds
http://code.google.com/p/dart/issues/detail?id=3280

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10540079

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8477 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-09 06:10:26 +00:00
scheglov@google.com d5375c61be Issue 3307. Report error when built-in identifier used as type annotation
http://code.google.com/p/dart/issues/detail?id=3307

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10544068

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8476 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-09 05:56:09 +00:00
zundel@google.com a85a5f420f In analyzer, catch use of continue and break in inappropriate places
(outside of a loop or in the case of break, with no referenced label)

See http://code.google.com/p/dart/issues/detail?id=1658
and http://code.google.com/p/dart/issues/detail?id=2441

Review URL: https://chromiumcodereview.appspot.com//10534065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8467 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 21:24:17 +00:00
brianwilkerson@google.com d5a1e96861 Fix for issue 1389
Review URL: https://chromiumcodereview.appspot.com//10541063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8465 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 20:22:49 +00:00
scheglov@google.com f2fd76c774 Issue 3309. Report only single error when attempt to use function in place of type
http://code.google.com/p/dart/issues/detail?id=3309

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10544040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8416 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 05:08:13 +00:00
zundel@google.com 10d6c4d932 Makes method shadowing a getter or setter or vice versa a compile time error.
See issue http://code.google.com/p/dart/issues/detail?id=973

Review URL: https://chromiumcodereview.appspot.com//10533050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8410 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 22:22:24 +00:00
brianwilkerson@google.com 616f55da86 Fix for issue 1343
Review URL: https://chromiumcodereview.appspot.com//10532054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8408 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 21:19:25 +00:00
zundel@google.com 189934681b Cleans up warnings in dartc code base
Review URL: https://chromiumcodereview.appspot.com//10536052

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8402 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 17:10:59 +00:00
brianwilkerson@google.com 8f9dff1b35 Fix for issue 3401: Implement casts in Analyzer
Review URL: https://chromiumcodereview.appspot.com//10536031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8397 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 14:54:20 +00:00
scheglov@google.com a05c494698 Issue 3308. Support for operator equals
http://code.google.com/p/dart/issues/detail?id=3308

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10537043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8372 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 23:50:49 +00:00
zundel@google.com 35f3395e7a Adds a warning if the + opearator is used with two strings.
http://code.google.com/p/dart/issues/detail?id=2549

Review URL: https://chromiumcodereview.appspot.com//10540029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8350 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 16:48:16 +00:00
scheglov@google.com d251594d60 Issue 3183. Warning when overriding method with different default value
http://code.google.com/p/dart/issues/detail?id=3183

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10543016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8349 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 16:37:06 +00:00
scheglov@google.com b60669264f Issue 3182. When TypeNode element found, but it is not Type, report only this error
http://code.google.com/p/dart/issues/detail?id=3182

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10545028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8348 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 16:32:18 +00:00
scheglov@google.com 06adbbc8c1 Issue 3181. Only fields of immediately surrounding class can be initialized
http://code.google.com/p/dart/issues/detail?id=3181

Tweak for message.
Report only error, no warning.

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10545029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8347 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 16:30:51 +00:00
scheglov@google.com 874d63eafb Issue 3180. Report shadowing top-level elements by local variable.
http://code.google.com/p/dart/issues/detail?id=3180

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10544022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8346 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 16:26:15 +00:00
brianwilkerson@google.com 4eaf3d1cdf Fix for issue 1399 (and minor error message clean-up)
Review URL: https://chromiumcodereview.appspot.com//10541018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8338 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 14:51:21 +00:00
scheglov@google.com 7fcfa5151e Issue 3221. Use upper bound type of then/else expressions for conditional
http://code.google.com/p/dart/issues/detail?id=3221

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10535027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8311 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 03:41:22 +00:00
scheglov@google.com de64c0ce0f Issue 3224. Incorrect return type of negate operator should cause a static warning
http://code.google.com/p/dart/issues/detail?id=3224

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10542008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8310 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 23:33:57 +00:00
pquitslund@google.com ffbfc2ce17 RefinableTypesFinder bootstrap.
First cut at an AST visitor that collects refinable types (with a fix to the type analyzer to flag inferred type nodes).
Review URL: https://chromiumcodereview.appspot.com//10512012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8307 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 20:47:17 +00:00
scheglov@google.com b2b07392f8 Issue 3264. Use field type is formal initializer has to declared type
http://code.google.com/p/dart/issues/detail?id=3264

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10540010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8304 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 19:40:41 +00:00
zundel@google.com 3c93d993e7 Eliminate internal compiler error when invoking a function type alias by mistake
See http://code.google.com/p/dart/issues/detail?id=1393

Review URL: https://chromiumcodereview.appspot.com//10545008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8302 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 18:40:46 +00:00
scheglov@google.com 7b1a2ee020 Issue 3266. Produce a warning when trying to call an inaccessible method
http://code.google.com/p/dart/issues/detail?id=3266

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10537006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8291 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 16:11:51 +00:00
scheglov@google.com b5142cdb20 Issue 3268. Support for replacing 'assert' statement with 'assert' function
http://code.google.com/p/dart/issues/detail?id=3268

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10516006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8290 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 16:08:09 +00:00
scheglov@google.com 740b67a0d1 Issue 3271. Top-level function 'main' should not have parameters
http://code.google.com/p/dart/issues/detail?id=3271

R=brianwilkerson@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10520019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8289 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 16:00:37 +00:00