Commit Graph

646 Commits

Author SHA1 Message Date
scheglov@google.com c4327d6db5 Issue 3986. Class member cannot have the same name as the class
http://code.google.com/p/dart/issues/detail?id=3986

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9577 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 00:31:07 +00:00
scheglov@google.com f9339df1eb Issue 4040. Fix NPE when report problem with no node.
http://code.google.com/p/dart/issues/detail?id=4040

Clean up after previous quick build fixes.

Can not reproduce actual rename problem, but it may be caused by exception during parsing which this CL is fixing.

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9522 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 20:28:06 +00:00
scheglov@google.com 5d73fe4cf3 Attempt to fix build
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9514 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 16:15:49 +00:00
scheglov@google.com 69435a374d Issue 2622. Fix for SourceInfo for DartUnit for one case of invalid source
http://code.google.com/p/dart/issues/detail?id=2622

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9513 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 16:02:01 +00:00
scheglov@google.com 38feb0a647 Issue 3985. Tweaks for warning messages
http://code.google.com/p/dart/issues/detail?id=3985

R=devoncarew@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9451 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-08 14:02:15 +00:00
devoncarew@google.com a5ad949dd4 TBR fix my fix
Review URL: https://chromiumcodereview.appspot.com//10701110

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9449 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-06 20:38:28 +00:00
devoncarew@google.com 3f82af28b6 Fix a build issue w/ non-terminating builds and issues parsing dart:html.
Review URL: https://chromiumcodereview.appspot.com//10690099

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9448 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-06 17:19:17 +00:00
devoncarew@google.com 4efd5000c1 Terminate parsing any single compilation unit if we encounter more then 100 parse errors.
Review URL: https://chromiumcodereview.appspot.com//10704068

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9445 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-06 16:20:40 +00:00
pquitslund@google.com 52b6e1bf37 Disable dartc diet parser test
Reviewed here: http://codereview.chromium.org/10696100/
Review URL: https://chromiumcodereview.appspot.com//10692081

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9380 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 22:12:05 +00:00
zundel@google.com 838a513f89 Add unit tests for ParserErrorCode values
Review URL: https://chromiumcodereview.appspot.com//10692080

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9377 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 21:28:59 +00:00
zundel@google.com 8a466804dc Another round of JUnit tests to finish off ResovlerErrorCodes I could reproduce
Review URL: https://chromiumcodereview.appspot.com//10700089

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9373 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 18:51:04 +00:00
zundel@google.com c7f31ca176 Migrates some resolver errors to parser stage
I found some resolver errors I could not reproduce because they were
not reachable code (parser wouldn't accept them).  Since we have discussed
running the analysis server in stages where parsing might be done first,
it made sense to me to move some error reporting into the parser anywy.
I also tried to make the messages more friendly.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9361 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 16:24:30 +00:00
zundel@google.com 209c5ba14b Another small batch of resolver tests
Removed some logic that duplicates errors from the parsing step

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9356 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 15:04:37 +00:00
zundel@google.com 7b28b0c257 Another small batch of Junit test for errors in the resolver
Review URL: https://chromiumcodereview.appspot.com//10693074

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9315 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 21:37:29 +00:00
zundel@google.com 029e0bd4ef Added a few tests, removed some error codes from Resolver
Review URL: https://chromiumcodereview.appspot.com//10695067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9313 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 21:21:01 +00:00
zundel@google.com 502a83da3c Adds some JUnit tests for type analysis
Review URL: https://chromiumcodereview.appspot.com//10704057

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9299 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 16:38:59 +00:00
zundel@google.com f899cff1f7 Mark analyzer error codes with no corresponding JUnit test
Review URL: https://chromiumcodereview.appspot.com//10700059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9287 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 14:50:34 +00:00
scheglov@google.com 2ffcb28ff6 Issue 3931. Visit children nodes safely.
http://code.google.com/p/dart/issues/detail?id=3931

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9276 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-30 00:53:08 +00:00
brianwilkerson@google.com d86c0dc9f9 Fix for issues 3729 and 3523
Review URL: https://chromiumcodereview.appspot.com//10696056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9270 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 21:31:07 +00:00
scheglov@google.com 13a1ef71b4 Issue 3753. Support for @deprecated annotation
http://code.google.com/p/dart/issues/detail?id=3753

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9264 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 20:26:02 +00:00
zundel@google.com f467653c17 Report type warning on assigning to some types of elements
For elements that are instance members, we want to emit a type warning
as opposed to a hard compile-time error.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9255 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 17:21:01 +00:00
zundel@google.com 825f8b9cb9 Flag uninitialized final variables in a class.
Issue 3655 : http://code.google.com/p/dart/issues/detail?id=3655

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9233 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 22:08:12 +00:00
zundel@google.com f0dac6bd73 Validate the target of break and continue statments from within a switch
Issue 3658 http://code.google.com/p/dart/issues/detail?id=3658

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9220 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 20:52:31 +00:00
zundel@google.com 74a356e682 Fixes the scope of case labels so that duplicate case labels are properly detected
Issue 2441 http://code.google.com/p/dart/issues/detail?id=2441

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9200 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 14:29:59 +00:00
scheglov@google.com 68b1aa49c9 Issue 3897. Don't use method _invocation_ as enclosing Element
http://code.google.com/p/dart/issues/detail?id=3897

TBR
Committed for now.

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9196 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 02:32:59 +00:00
zundel@google.com f2e095cba3 No compile-time error when overriding a static field or method
In some cases, you need a warning though

Issue 3659 http://code.google.com/p/dart/issues/detail?id=3659
Issue 3779 http://code.google.com/p/dart/issues/detail?id=3779

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9191 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 22:18:01 +00:00
zundel@google.com 230d02406c When a variable name is used as a type, emit a warning, not an error
Issue 3474 http://code.google.com/p/dart/issues/detail?id=3474

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9171 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 14:21:37 +00:00
scheglov@google.com 5db61f2d72 Issue 3793. Fix for function expressions with a parameter of the same name
http://code.google.com/p/dart/issues/detail?id=3793

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9170 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 14:10:49 +00:00
scheglov@google.com ae1ca6df94 Make invalid @override an warning
R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9169 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 14:09:57 +00:00
devoncarew@google.com f204b3fc82 Fix some issues when debugging against package: libraries (Dartium and command-line).
Some general cleanup of logging messages on connection close.
Review URL: https://chromiumcodereview.appspot.com//10690002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9147 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 04:44:16 +00:00
zundel@google.com cf2fecd6aa An implicit super() invocation wasn't being checked for the wrong # of args
Issue 2580 http://code.google.com/p/dart/issues/detail?id=2580

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9136 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 21:14:13 +00:00
scheglov@google.com 90d27a764a Issue 3839. Warn when 'dart:io' and 'dart:html' are used in single library
http://code.google.com/p/dart/issues/detail?id=3839

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9133 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 20:06:12 +00:00
scheglov@google.com ee5b047a5f Attempt to fix build
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9131 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 19:57:52 +00:00
scheglov@google.com 47e814198a Produce error for invalid @override
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9130 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 19:52:37 +00:00
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