Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(903)

Issue 8956047: This adds a unit test to show the type checking functionality missing in dartc (Closed)

Created:
9 years ago by zundel
Modified:
9 years ago
Reviewers:
codefu
CC:
reviews_dartlang.org
Visibility:
Public.

Description

This adds a unit test to show the type checking functionality missing in dartc This refines omitting the runtime-type checks in certain cases to just apply to type variables (original disabled by r2660) BUG=925 TEST= Committed: https://code.google.com/p/dart/source/detail?r=2771

Patch Set 1 #

Total comments: 1

Patch Set 2 : Updated test, $chk() can sneak in another way #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -21 lines) Patch
M compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java View 1 chunk +19 lines, -17 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/language.status View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/language-leg.status View 1 chunk +1 line, -0 lines 0 comments Download
A tests/language/src/TypeChecksInFactoryMethodTest.dart View 1 1 chunk +34 lines, -0 lines 1 comment Download

Messages

Total messages: 2 (0 generated)
zundel
http://codereview.chromium.org/8956047/diff/1/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java File compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java (right): http://codereview.chromium.org/8956047/diff/1/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java#newcode139 compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java:139: WRONG_NUMBER_OF_TYPE_ARGUMENTS("%s: wrong number of type arguments. Expected %d"); I ...
9 years ago (2011-12-20 21:38:58 UTC) #1
codefu
9 years ago (2011-12-22 16:13:50 UTC) #2
lgtm

http://codereview.chromium.org/8956047/diff/4001/tests/language/src/TypeCheck...
File tests/language/src/TypeChecksInFactoryMethodTest.dart (right):

http://codereview.chromium.org/8956047/diff/4001/tests/language/src/TypeCheck...
tests/language/src/TypeChecksInFactoryMethodTest.dart:16: // If T is not a
string, runtime type checks should fail
And instance-of check should also fail.

Powered by Google App Engine
This is Rietveld 408576698