Commit Graph

883 Commits

Author SHA1 Message Date
scheglov@google.com 6ed95757fe Issue 3752. Support for @override annotations (as structured doc comments)
http://code.google.com/p/dart/issues/detail?id=3752

Now we always record comments and bind them to nodes.
We record DartMetadata for each DartDeclaration with flags for @deprecated and @override.
In this CL we analyze @override and report error if method does not actually override anything.

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9129 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 19:47:48 +00:00
zundel@google.com 0d2b905b50 Remove warning about instantiating an abstract class without implementing a member
Issue 2619 : http://code.google.com/p/dart/issues/detail?id=2619

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9128 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 19:29:08 +00:00
scheglov@google.com 8e5cc32596 Issue 3789. Resolve library prefix for LibraryElement for field and function references.
http://code.google.com/p/dart/issues/detail?id=3789

R=brianwilkerson@google.com,messick@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9126 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 18:42:50 +00:00
scheglov@google.com bcf23c754a Issue 3860. Check that setter/getter are both static or not static
http://code.google.com/p/dart/issues/detail?id=3860

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9123 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 17:49:55 +00:00
brianwilkerson@google.com 74d0a1cb8a Initial support for hide and show in import directives. This updates the AST structure to support the new import directive format and includes an untested hint at what the parser changes will likely be (for context), but doesn't change the current behavior of analyzer.
Review URL: https://chromiumcodereview.appspot.com//10665033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9116 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 14:51:54 +00:00
scheglov@google.com e7495f7b04 Show override indicator.
R=brianwilkerson@google.com,pquitslund@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9111 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 14:34:15 +00:00
brianwilkerson@google.com 8b400d2dd6 Fix for issue 3519
Review URL: https://chromiumcodereview.appspot.com//10660012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9083 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 20:02:48 +00:00
scheglov@google.com a130cb8df0 Issue 3712. Infer closure parameters, 2-nd pass
http://code.google.com/p/dart/issues/detail?id=3712

Now also support for inference from FunctionType, not only from FunctionTypeAlias.
For example List.map().

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9081 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 18:44:23 +00:00
scheglov@google.com 02d0554f59 Issue 2477. Can not reference instance method from initializer
http://code.google.com/p/dart/issues/detail?id=2477

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9079 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 18:41:28 +00:00
scheglov@google.com f9b4e096e6 Issue 3748. Support for 'factory lib.Interface.namedConstructor()'
http://code.google.com/p/dart/issues/detail?id=2478

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9077 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 18:23:58 +00:00
danrubel@google.com e63836db88 Fix NPE when DartC analyze library fails
Review URL: https://chromiumcodereview.appspot.com//10665020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9066 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 16:51:19 +00:00
brianwilkerson@google.com efc85a5bb9 Fix for issue 2437
Review URL: https://chromiumcodereview.appspot.com//10627020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9047 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 22:23:03 +00:00
zundel@google.com 7954d39977 Removes compile-time error from implementing the same interface more than once
This change allows inheritenance of the same interface with different parameterization,
but puts out a (currently non spec) warning if the resulting two interface types
are not assignable to each other.

Issue 2495 http://code.google.com/p/dart/issues/detail?id=2495
Issue 3803 http://code.google.com/p/dart/issues/detail?id=3803

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9035 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 16:39:00 +00:00
scheglov@google.com 21865c1a3d Issue 3712. Infer closure (function literal) parameter types
http://code.google.com/p/dart/issues/detail?id=3712

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9000 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 20:49:49 +00:00
brianwilkerson@google.com 1d811c9ef5 Fix to get the build green. We need to figure out why we're not resolving the binary operator correctly, but that can happen in a later CL.
Review URL: https://chromiumcodereview.appspot.com//10630008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8995 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 18:24:46 +00:00
zundel@google.com 7671eef5d7 Redirecting constructors may not have a body. Fail with compile-time error
See issue 2474 http://code.google.com/p/dart/issues/detail?id=2474

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8982 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 15:18:07 +00:00
brianwilkerson@google.com 197ee2abe6 Back out support for try-on; too early
Review URL: https://chromiumcodereview.appspot.com//10578051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8940 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 21:12:49 +00:00
brianwilkerson@google.com 0af8d013f6 Fix for issue 3756
Review URL: https://chromiumcodereview.appspot.com//10536223

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8938 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 20:17:15 +00:00
zundel@google.com cffb776ddf More support of library privacy for analyzer
See http://code.google.com/p/dart/issues/detail?id=2383

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8933 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 18:43:32 +00:00
zundel@google.com f12d219558 Revert "More support of library privacy for analyzer"
Review URL: https://chromiumcodereview.appspot.com//10578047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8931 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 18:16:17 +00:00
zundel@google.com cda927b48f More support of library privacy for analyzer
See http://code.google.com/p/dart/issues/detail?id=2383

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8926 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 17:40:56 +00:00
brianwilkerson@google.com fc2e4153a1 Fix for issue 3541 and a small debugging improvement
Review URL: https://chromiumcodereview.appspot.com//10536211

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8907 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 15:00:23 +00:00
zundel@google.com 6a781fbebe Dart Editor overlooks assignment to final fields scoped by "this"
See issue http://code.google.com/p/dart/issues/detail?id=2213

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8898 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 11:42:30 +00:00
scheglov@google.com 9613a3810a Issue 2382. Using a variable in a scope before its declared that shadows another variable
http://code.google.com/p/dart/issues/detail?id=2382

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8876 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 21:42:41 +00:00
scheglov@google.com 047d50d5f3 Issue 2373. 'v is Unknown' is compile-time warning, not error
http://code.google.com/p/dart/issues/detail?id=2373

...but 'v is Known<No, Paramaters>' is error.
Illogical, but so says the Spec.

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8872 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 21:26:38 +00:00
scheglov@google.com 89222499be Issue 2379. Can't use type variable with const constructor
http://code.google.com/p/dart/issues/detail?id=2379

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8865 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 19:48:54 +00:00
scheglov@google.com aab2cad8ec Issue 2378. Function expressions with no name should cause warnings, not errors
http://code.google.com/p/dart/issues/detail?id=2378

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8862 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 18:40:18 +00:00
zundel@google.com 26f4d623e4 Gets rid of some warnings in the analyzer for unused code and unused imports
Ironically, the code to detect dead code in switch statements was itself
dead (holdover from a change I did yesterday)

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8853 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 15:45:19 +00:00
scheglov@google.com 4884ce068b Issue 1655. Check initializer values of const constructors
http://code.google.com/p/dart/issues/detail?id=1655

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8848 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 14:23:40 +00:00
scheglov@google.com ba116549a0 Issue 1355. Support for call(). Tweaks for element locator and rename refactoring
R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8826 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 22:03:44 +00:00
zundel@google.com 5695d00452 Fix parse error on dead code in a switch statement
http://code.google.com/p/dart/issues/detail?id=2149

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8822 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 21:03:35 +00:00
brianwilkerson@google.com a9160e1ca4 Fix for issues 1473 and 3521
Review URL: https://chromiumcodereview.appspot.com//10574003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8821 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 20:52:56 +00:00
scheglov@google.com 450cbee4d3 Issue 1197. Support for using 'static' as method name
http://code.google.com/p/dart/issues/detail?id=1197

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8801 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 15:58:56 +00:00
scheglov@google.com 4e72987380 Issue 963. Check default values for parameters of local functions. Support for string interpolation.
http://code.google.com/p/dart/issues/detail?id=963

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8799 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 15:09:35 +00:00
scheglov@google.com 63ef07e3dd Issue 2339. Fix for parsing function expression inside of new expression inside of initializer
http://code.google.com/p/dart/issues/detail?id=2339

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8761 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-16 14:26:56 +00:00
scheglov@google.com fe292655fe Use operator location for operator resolving problems
R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8760 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-16 14:25:42 +00:00
scheglov@google.com 22511e7851 Clean up DartAstUtilities.getElement(), analysis should provide element for every identifier
R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8757 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-16 01:44:24 +00:00
scheglov@google.com 3a67e7ad10 Improve 'as' support with negation
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8745 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 20:49:18 +00:00
scheglov@google.com 35436b06b5 Issue 3643. Changes for review comments
Initially https://chromiumcodereview.appspot.com/10545189/

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8737 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 20:04:07 +00:00
scheglov@google.com fedb10fc52 Test for 'if (v as T)' and fix to make 'if as' check useful
R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8735 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 19:48:59 +00:00
devoncarew@google.com 57f28932e9 Fix for http://code.google.com/p/dart/issues/detail?id=3616 - missing dartdoc tooltips for getters and setters; also, poorly formatter tooltips for functions as parameters.
Review URL: https://chromiumcodereview.appspot.com//10542177

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8727 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 18:00:58 +00:00
scheglov@google.com 45203c06ce Issue 3643. Associate 'no such method' problem with method name, not with whole invocation
http://code.google.com/p/dart/issues/detail?id=3643

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8726 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 17:56:31 +00:00
scheglov@google.com bd7b9408d7 Attempt to fix build
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8698 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 23:00:29 +00:00
scheglov@google.com a01d245a87 Issue 3530. Import elements into separate import namespace
http://code.google.com/p/dart/issues/detail?id=3530

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8696 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 22:55:41 +00:00
keertip@google.com f7628dde99 fix for correct resolution of package: uris
Review URL: http://codereview.chromium.org//10540162

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8694 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 22:21:19 +00:00
zundel@google.com 1b7f8307d2 A redirect constructor cannot reference an instance method.
See issue http://code.google.com/p/dart/issues/detail?id=2105

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8685 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 20:32:33 +00:00
scheglov@google.com 6e8c1ff0b4 Issue 3516. Make displaying warning for inferred types configurable
http://code.google.com/p/dart/issues/detail?id=3516

I'm adding also people who expressed opinions about displaying such warnings or not.

R=brianwilkerson@google.com,messick@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8684 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 18:38:19 +00:00
brianwilkerson@google.com a21c18ed54 Additional fix for issue 2155
Review URL: https://chromiumcodereview.appspot.com//10539159

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8683 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 18:23:42 +00:00
scheglov@google.com 59ea2febb5 Attempt to fix build #2
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8680 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 18:18:28 +00:00
zundel@google.com 3f945014e7 Adds warning when a named argument is specified, but a positional argument is missing
http://code.google.com/p/dart/issues/detail?id=1941

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8677 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 17:52:31 +00:00