scheglov@google.com
24a93f8cee
Report HintCode.UNUSED_ELEMENT for classes.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//704413005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41650 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 02:57:23 +00:00
paulberry@google.com
5aa9f8cd8c
Fix incorrect syntax in constant evaluation test.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//711963002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41648 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 20:31:27 +00:00
brianwilkerson@google.com
93cecbd276
Fix hurt recovery
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//713953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41646 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 19:38:15 +00:00
paulberry@google.com
3bf0ca6aa8
Fix analyzer's treatment of mixin constructors.
...
This changes analyzer to match the spec (and the VM behavior) with
regard to which base class constructors are forwarded through mixin
applications: only those constructors that take zero optional
parameters are forwarded. In addition, the tests in tests/language/
are updated to match analyzer and the VM.
There is one small difference between analyzer and the VM behavior:
the spec says that if no constructors are forwarded at all, then the
mixin application will automatically acquire an implicit default
constructor. The VM behavior is to issue an error in this
circumstance. After consulting with Gilad, it seems like the VM
behavior is more consistent with the intent, so I've chosen to make
analyzer and the tests match the VM behavior, in the hopes that the
spec can be changed accordingly.
Should we change our minds in the future and decide that we want to
keep the spec as is, the tests and analyzer behavior can easily be
changed.
BUG=dartbug.com/19576
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//707073002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41645 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 19:28:40 +00:00
brianwilkerson@google.com
c258a1d7f6
Create fewer unnecessary lists
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//712083003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41641 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 17:25:58 +00:00
brianwilkerson@google.com
d23df4f448
Clean up references in comments
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//708263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41623 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-08 15:45:19 +00:00
brianwilkerson@google.com
f4f12546ad
Fix for issue 20796
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//689383005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41622 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-08 04:48:44 +00:00
paulberry@google.com
9c1ea65f07
Prevent conflict between parameter names and local function names.
...
From section 9.2 (Formal Parameters) of the spec:
The formal parameter list of a function introduces a new scope known
as the function's formal parameter scope. The formal parameter
scope of a function f is enclosed in the scope where f is declared.
Therefore, if one of the function's parameters has the same name as
the function itself, that isn't a problem.
Previously, we would add a local function to its own formal parameter
scope before visiting it (to allow it to call itself recursively), and
then after visiting it we would add it to the scope of the enclosing
function (so that the enclosing function could call it).
The fix is to add the local function just to the scope of the
enclosing function, and to do it before visiting the local function so
that recursion still works.
BUG=dartbug.com/20074
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//688253004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41621 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-08 01:11:17 +00:00
brianwilkerson@google.com
009128c945
Fix issue 20577
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//705393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41616 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 21:33:44 +00:00
brianwilkerson@google.com
ec7979a9a2
Fix for issue 20125 - improved error messages
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//712663002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41613 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 19:29:12 +00:00
paulberry@google.com
8ff8367558
Additional fixes to printing of error codes.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//706933005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41611 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 17:43:28 +00:00
brianwilkerson@google.com
d289dda555
Fix remaining error code classes
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//706283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41606 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 16:24:15 +00:00
paulberry@google.com
d3101210b2
Fix printing of error codes in unit tests.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//707733005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41590 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 22:31:43 +00:00
brianwilkerson@google.com
debee8c776
Fix for issue 19100 - better recovery
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//692303003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41584 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 21:37:27 +00:00
scheglov@google.com
772a0c6b22
Fix 'Unused local variable' hints in analyzer and analysis_server.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//709493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41576 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 18:32:54 +00:00
brianwilkerson@google.com
7ea594bff5
Clean up error codes
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//706823003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41574 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 17:55:11 +00:00
scheglov@google.com
ca91f9f770
Report HintCode.UNUSED_LOCAL_VARIABLE for local variables whose value is never used.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//686113007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41568 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 17:00:28 +00:00
brianwilkerson@google.com
750b5e426c
Fix issue 19424
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//700943003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41526 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 17:05:58 +00:00
paulberry@google.com
92b1c25f83
Avoid traversing classes when looking for circular references in typedefs.
...
BUG=dartbug.com/19459
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//705553003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41525 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 16:58:56 +00:00
paulberry@google.com
df62a0d75d
Warn when implicit default value overrides explicit one that differs.
...
BUG=dartbug.com/18914
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//700923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41503 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 20:32:18 +00:00
paulberry@google.com
e18464b912
Always check if instance method name collides with superclass static.
...
Previously we only did this check if nothing was overridden.
Persumably that was intended as a speed optimization, since at first
glance it would seem that if the instance method overrides something,
then it can't possibly conflict with a static method in the
superclass. However, that optimization doesn't work if the method
being overridden is in an interface (in that case the superclass can
still have a static method with the same name). So just go ahead and
check in all cases.
BUG=dartbug.com/18947
R=scheglov@google.com
Review URL: https://codereview.chromium.org//698973005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41501 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 19:31:31 +00:00
paulberry@google.com
ae271bf236
Split the largest classes from resolver.dart to their own files.
...
This should make resolver.dart small enough to support side-by-side
diffs in the code review tool.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//700753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41489 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 14:04:36 +00:00
paulberry@google.com
e5fcd1fd91
Properly restore context when leaving visitor functions in ErrorVerifier.
...
BUG=dartbug.com/15565
R=scheglov@google.com
Review URL: https://codereview.chromium.org//702623002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41478 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 04:17:06 +00:00
paulberry@google.com
18b71fa42a
Fix type analysis of the keyword "dynamic".
...
The type of "dynamic" isn't "dynamic", it's "Type".
BUG=dartbug.com/18731
R=scheglov@google.com
Review URL: https://codereview.chromium.org//680423003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41477 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 04:13:06 +00:00
paulberry@google.com
31c3f90301
Properly implement identical() test in analyzer constant evaluation.
...
Previously we were treating identical(x, y) as equivalent to (x == y).
However the semantics aren't the same.
BUG=dartbug.com/21177
R=scheglov@google.com
Review URL: https://codereview.chromium.org//689173004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41475 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 01:32:33 +00:00
paulberry@google.com
35c6e351da
Fix access semantics for foreach loops.
...
In a statement like:
for (x in ...) { ... }
"x" needs to be considered to be in setter context, not getter
context.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//702473002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41460 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 16:47:28 +00:00
brianwilkerson@google.com
e9696e5f67
Clean up logging uses
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//685993004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41443 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 19:05:19 +00:00
brianwilkerson@google.com
20c13d4715
Fix logging API. This should fix the exception I'm seeing. I'll clean up uses of the deprecated API in a separate CL.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//694833002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41439 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 16:22:50 +00:00
brianwilkerson@google.com
678f9e2a3e
Fix issue 21379
...
R=danrubel@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//683673004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41426 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 21:07:50 +00:00
danrubel@google.com
010f33956f
cleanup warnings/hints
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//685363003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41419 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 15:12:30 +00:00
brianwilkerson@google.com
40ad9b8eeb
Improve cache entry tests
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//686293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41408 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 21:56:56 +00:00
scheglov@google.com
e96b29143c
Rename ForEachStatement.iterator -> iterable.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//689793003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41405 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 21:33:04 +00:00
paulberry@google.com
03b3d16691
Make table entries on analysis server's '/status' page clickable.
...
Clicking on a table entry now takes you to a list of files in the
given state.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//685863003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41400 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 20:05:16 +00:00
brianwilkerson@google.com
0a20e03aa0
Add tests of incremental scanner
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//675173004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41374 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 21:51:42 +00:00
scheglov@google.com
abeba4c773
Replace custom EngineTestCase.assertEquals() with 'unorderedEquals'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//673233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41365 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 17:00:06 +00:00
scheglov@google.com
d9aa3d8946
Remove unused EngineTestCase.assertX() methods.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//683193002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41362 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 16:19:39 +00:00
scheglov@google.com
9a806f616d
Replace EngineTestCase.assertSize() with hasLength().
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//686793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41361 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 15:57:33 +00:00
brianwilkerson@google.com
2f937685fc
Code clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//667463004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41348 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 00:25:22 +00:00
scheglov@google.com
63523cf050
Inline JUnitTestCase 'assert' methods.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//685573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41347 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 00:00:13 +00:00
scheglov@google.com
fbf42c6a0d
Port enum getter types fix to Dart.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//680063003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41342 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 21:58:37 +00:00
scheglov@google.com
555b551ee5
Fix for AnalysisContext.getElement() for enums.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//685483003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41337 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 20:54:43 +00:00
scheglov@google.com
0f5bc31b0d
Remove any unnecessary parens around expressions in interpolations.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//681833003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41336 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 20:19:18 +00:00
scheglov@google.com
71a54f980b
Replace ${name} with $name where possible.
...
...i.e. when the next character is not a part of an identifier.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//681003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41333 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 19:43:44 +00:00
brianwilkerson@google.com
2c08b51c9b
Remove unnecessary List creation
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//677303002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41327 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 17:41:45 +00:00
scheglov@google.com
c15304f516
Remove EngineTestCase.createSource().
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//679173002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41324 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 16:14:37 +00:00
brianwilkerson@google.com
a22aa71cab
Remove JavaIterator and MapEntry
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//680913002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41321 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 15:37:24 +00:00
brianwilkerson@google.com
9d0ad88805
Remove Math and most uses of PrintStringWriter
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//649873007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41318 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 14:49:20 +00:00
scheglov@google.com
78c7e8fc06
Convert most of the EngineTestCase.createSource invocations into multi-line String literals.
...
There are sill invocations in Angular tests, but these call it with List<String>,
I will clean them up in the following CL.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//682553002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41308 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 22:03:21 +00:00
scheglov@google.com
7d3a0e4cb2
Port enums AST changes to Dart.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//679923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41306 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 21:59:39 +00:00
brianwilkerson@google.com
66f7c97acf
Remove JavaStringBuilder
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//680863002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41305 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 21:49:04 +00:00