Commit Graph

15 Commits

Author SHA1 Message Date
regis@google.com 0532a90a2f Implement type cast in the VM.
Review URL: https://chromiumcodereview.appspot.com//10659005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9070 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 17:23:11 +00:00
iposva@google.com d402068134 - Fix use of String operator + in core libraries.
Previously reviewed as part of https://chromiumcodereview.appspot.com/9690003
Review URL: https://chromiumcodereview.appspot.com//9730009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5656 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-19 19:42:29 +00:00
regis@google.com d74c2008be Fix type check to perform a subtype test at top level instead of an
assignability test. This only makes a difference when assigning an instance of
a function type.
Fix a bad language test.
Disable a bad co19 test (issue 99 filed).
Change error message for dynamic type error.
Review URL: https://chromiumcodereview.appspot.com//9664029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5413 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 16:16:12 +00:00
iposva@google.com 993cd03e41 - Fix build by rolling back r5324, r5325.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5333 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-12 16:31:12 +00:00
iposva@google.com 8ca5ba4d15 - Fix use of String operator + in corelib and standalone libraries.
Review URL: https://chromiumcodereview.appspot.com//9690003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5325 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-12 15:26:55 +00:00
regis@google.com 33bd965e2a Generate a dynamic type error when creating an instance with a bound error.
Review URL: https://chromiumcodereview.appspot.com//9665013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5250 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-09 21:15:11 +00:00
regis@google.com f4ddc43cdf Generate dynamic type errors according to spec.
Fix a few bad tests.
Turn a couple negative tests in multi-tests.
Triage a few co19 failing tests.

Still to do:
Check bounds of generic types at runtime in checked mode.
Stop reporting bounds error in new operator as a compile time error.
Review URL: https://chromiumcodereview.appspot.com//9615035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5064 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 02:23:12 +00:00
regis@google.com 47724a8491 Add support for malformed types and postpone some related errors from compile
time to execution time.

Still to do (once spec is clarified):
- properly handle generic type bounds errors
- properly handle 'instance of' type checks involving malformed types
- fix bad tests
Review URL: https://chromiumcodereview.appspot.com//9515011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4732 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 02:14:18 +00:00
srdjan@google.com be66ab9a1c Fix for issue 1307: throw runtime exception instead of reporting a compile time error if a static call cannot be resolved.
Review URL: https://chromiumcodereview.appspot.com//9316100

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3922 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-03 22:25:16 +00:00
regis@google.com a2bb53c7af Implement type checking of map literals (issue 221).
Support proper syntax for map literals (at most one type argument is allowed)
and give a warning when legacy syntax is used.
Add tests.
Fix tests.
Review URL: http://codereview.chromium.org//8637018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1764 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-22 21:42:07 +00:00
regis@google.com 314a89e16c Update comments in core lib showing proper factory syntax.
Improve error messages reported from class finalizer.
Fix parser error reporting to be thread safe.
Reformat type error and failed assertion messages to be consistent.
Add one more new factory syntax test.
Review URL: http://codereview.chromium.org//8549033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1708 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 17:06:52 +00:00
srdjan@google.com 8b6dbe1b76 Do not allow allocation of FallThroughError and AssertionError by the user.
Review URL: http://codereview.chromium.org//8569013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1671 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 20:36:42 +00:00
regis@google.com dc895f3138 Rename class AssertError to AssertionError in the VM (fix issue 119).
Move VM specific tests to the correct tests directory.
Enable asserts in the VM when type checks are enabled.
Review URL: http://codereview.chromium.org//8294005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@460 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-14 22:02:50 +00:00
mmendez@google.com fc7390d97b Add support for --enable_type_checks (developer mode) for dartc.
This patch is based on https://chromereviews.googleplex.com/3520019/.  However it addresses the following issues:

1) TypeError exceptions will now have the stack trace filled in.
2) Type parameters are now accessible from closurized code, including the trampoline shims for named optinal parameters.
3) Suppress use of FunctionExpressionInliner with type checks because the inline normalization can leave return nodes in the AST.
4) Pass the generateHumanReadableOutput flag to the closure backend.
5) TypeDartcTest passes in debug and release modes with type checking enabled.  We still need to enable the additional cases in the code.

Review URL: https://chromereviews.googleplex.com/3558021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@271 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-08 04:11:34 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00