Commit Graph

398 Commits

Author SHA1 Message Date
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
scheglov@google.com 9b54a763d4 Issue 3269. Warning when 'case' is not type compatible with 'switch' expression
http://code.google.com/p/dart/issues/detail?id=3269

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8288 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 15:55:46 +00:00
brianwilkerson@google.com c8cb519a31 Fix for issues 2380 and 2381
Review URL: https://chromiumcodereview.appspot.com//10515012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8283 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 14:41:52 +00:00
scheglov@google.com 22d82585d5 Issue 3272. Void can be assigned to Dynamic
http://code.google.com/p/dart/issues/detail?id=3272

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8274 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 03:23:41 +00:00
scheglov@google.com 9713fa1efd Infer types using 'v is! Type'
R=brianwilkerson@google.com,messick@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8229 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-03 22:22:02 +00:00
scheglov@google.com b6a24f8940 Infer also field types in classes and top-level
R=brianwilkerson@google.com,pquitslund@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8206 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-01 17:30:21 +00:00
scheglov@google.com 7b9e29da5a Report not existing function only in resolver
R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8204 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-01 17:08:38 +00:00
brianwilkerson@google.com 615e8cf24d First step toward separating the name space for names within a library from that for imported names
Review URL: https://chromiumcodereview.appspot.com//10444106

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8165 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 16:10:41 +00:00
brianwilkerson@google.com 82d2680d90 Fix for issue 3220
Review URL: https://chromiumcodereview.appspot.com//10447118

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8161 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 15:49:42 +00:00
brianwilkerson@google.com 232c54a90a Fix for issue 2407
Review URL: https://chromiumcodereview.appspot.com//10453083

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8128 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 21:45:07 +00:00
scheglov@google.com cc12797fb9 Issue 3223. Don't warn about types compatibility is one of the types was inferred
http://code.google.com/p/dart/issues/detail?id=3223

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8080 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 21:24:48 +00:00
scheglov@google.com 3eb17a6ca6 Issue 3155. Better error report for directives in sourced unit
http://code.google.com/p/dart/issues/detail?id=3155

R=danrubel@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8078 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 20:29:58 +00:00
scheglov@google.com 9c22f24fda Issue 3248. Fix for extra interface final field warnings
http://code.google.com/p/dart/issues/detail?id=3248

I can not find any proof in spec that interface fields are always final.
In contrast, I see that dart:html explicitly marks some fields as final.

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8065 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 15:19:49 +00:00
scheglov@google.com 2c09d62b3f Issue 3251. Fixes for node type
http://code.google.com/p/dart/issues/detail?id=3251

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8064 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 15:16:58 +00:00
keertip@google.com 916be0f459 fix to support package: scheme
Review URL: http://codereview.chromium.org//10442037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8013 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-25 19:55:07 +00:00
scheglov@google.com 421bf66a40 Issue 3209. Mark assignment to final field as error
http://code.google.com/p/dart/issues/detail?id=3209

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7972 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-25 00:33:56 +00:00
scheglov@google.com 6a5f143243 More getter fixes
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7963 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 21:36:57 +00:00
scheglov@google.com ba6b68d65d Fix for getter access expression type
R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7960 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 18:58:03 +00:00
keertip@google.com c52fb82f4e fix an issue with uri's
Review URL: http://codereview.chromium.org//10429009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7949 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 15:23:15 +00:00
scheglov@google.com e3831f1488 Use most specific inferred type, or fall back to Dynamic
R=messick@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7937 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 01:24:02 +00:00
scheglov@google.com 9c2e925901 Resolve operators to int/double instead of num where possible
R=messick@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7933 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 22:42:45 +00:00
scheglov@google.com ef9322bf15 Type inference in if, while, for and for-in statements
R=messick@google.com,brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7914 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 16:33:40 +00:00
scheglov@google.com 511a8bf94b Attempt to fix build
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7840 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 02:40:06 +00:00
scheglov@google.com 00d2b5c654 Propagate variable type in TypeAnalyzer
Don't re-resolve in CompletionEngine to keep propagated types.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7838 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 01:01:26 +00:00
scheglov@google.com 3b1297dcc7 Issue 3067. When we check getter/setter compatibility, we should compare propagated type variables.
http://code.google.com/p/dart/issues/detail?id=3067

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7763 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 21:11:07 +00:00
scheglov@google.com eae9094dbf Issue 3123. Catch exceptions in Source.exists()/initProperties()
http://code.google.com/p/dart/issues/detail?id=3123

R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7754 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 17:22:37 +00:00
scheglov@google.com 76d9238a3a Fix for double getter int for-each
R=brianwilkerson@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7750 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 16:31:32 +00:00
keertip@google.com 98bb9e8526 add support for package: to the editor
Review URL: http://codereview.chromium.org//10377181

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7744 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 15:32:13 +00:00
jwren@google.com 054d8ca0df Initial new file FileUtils with a single public static method.
Review URL: https://chromiumcodereview.appspot.com//10386121

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7625 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 20:26:58 +00:00
danrubel@google.com 5dbfe5026d Update analysis server and indexer
Review URL: https://chromiumcodereview.appspot.com//10391092

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7591 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-13 21:50:34 +00:00
scheglov@google.com d206634e9d Initial support for 'Extract temp' - only when single expression selected
Actually, already can be useful.
For example to extract single argument of invocation into variable.

R=messick@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7590 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-13 05:10:41 +00:00