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

Issue 8384012: Make some ErrorCode-s compile-time errors and some just type warnings (Closed)

Created:
9 years, 1 month ago by scheglov
Modified:
9 years, 1 month ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make some ErrorCode-s compile-time errors and some just type warnings R=zundel@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=1089

Patch Set 1 #

Total comments: 11

Patch Set 2 : Use single NO_SUCH_TYPE (but separate for type warning and compile-time error), tweak tests #

Total comments: 8

Patch Set 3 : Add WrongNumberTypeArgumentsTest.dart #

Patch Set 4 : Changes for comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+538 lines, -157 lines) Patch
M compiler/java/com/google/dart/compiler/DartCompilerMainContext.java View 1 1 chunk +0 lines, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/Elements.java View 1 chunk +4 lines, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/MemberBuilder.java View 1 3 chunks +8 lines, -3 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java View 1 7 chunks +30 lines, -23 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java View 1 5 chunks +15 lines, -5 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/Resolver.java View 1 5 chunks +23 lines, -7 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java View 1 2 chunks +3 lines, -0 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java View 1 2 chunks +9 lines, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java View 1 2 chunks +4 lines, -2 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java View 1 chunk +1 line, -1 line 0 comments Download
D compiler/javatests/com/google/dart/compiler/resolver/ArrayLiteralNegativeTest.dart View 1 1 chunk +0 lines, -9 lines 0 comments Download
D compiler/javatests/com/google/dart/compiler/resolver/MapLiteralNegativeTest.dart View 1 1 chunk +0 lines, -9 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java View 1 4 chunks +79 lines, -13 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java View 1 5 chunks +311 lines, -51 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java View 1 6 chunks +27 lines, -21 lines 0 comments Download
M tests/co19/co19-compiler.status View 1 4 chunks +13 lines, -2 lines 0 comments Download
M tests/language/language.status View 1 3 chunks +4 lines, -1 line 0 comments Download
D tests/language/src/WrongNumberTypeArgumentsNegativeTest.dart View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
A + tests/language/src/WrongNumberTypeArgumentsTest.dart View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M tests/stub-generator/stub-generator.status View 1 1 chunk +2 lines, -0 lines 2 comments Download

Messages

Total messages: 15 (0 generated)
scheglov
9 years, 1 month ago (2011-10-31 17:56:10 UTC) #1
zundel
http://codereview.chromium.org/8384012/diff/1/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java File compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java (right): http://codereview.chromium.org/8384012/diff/1/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java#newcode723 compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java:723: TypeKind typeKind = TypeKind.of(type); // XXX what is // ...
9 years, 1 month ago (2011-10-31 19:00:28 UTC) #2
scheglov
http://codereview.chromium.org/8384012/diff/1/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java File compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java (right): http://codereview.chromium.org/8384012/diff/1/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java#newcode31 compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java:31: NO_SUCH_TYPE_PARAMETER("no such type \"%s\" in method parameter"), On 2011/10/31 ...
9 years, 1 month ago (2011-10-31 20:48:05 UTC) #3
zundel
http://codereview.chromium.org/8384012/diff/1/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java File compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java (right): http://codereview.chromium.org/8384012/diff/1/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java#newcode202 compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java:202: Type type = resolveType(typeNode, isStatic, TypeErrorCode.NO_SUCH_TYPE_GENERICS_ARGUMENT); Gilad clarified that ...
9 years, 1 month ago (2011-11-01 13:54:37 UTC) #4
scheglov
On 2011/11/01 13:54:37, zundel wrote: > http://codereview.chromium.org/8384012/diff/1/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java > File compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java > (right): > > http://codereview.chromium.org/8384012/diff/1/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java#newcode202 ...
9 years, 1 month ago (2011-11-01 15:08:57 UTC) #5
scheglov
9 years, 1 month ago (2011-11-01 19:32:07 UTC) #6
scheglov
9 years, 1 month ago (2011-11-01 19:59:12 UTC) #7
zundel
http://codereview.chromium.org/8384012/diff/7001/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java File compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java (right): http://codereview.chromium.org/8384012/diff/7001/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java#newcode30 compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java:30: import static com.google.dart.compiler.util.AstUtil.and; I am assuming the changes in ...
9 years, 1 month ago (2011-11-01 20:03:03 UTC) #8
scheglov
9 years, 1 month ago (2011-11-01 20:25:00 UTC) #9
scheglov
http://codereview.chromium.org/8384012/diff/7001/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java File compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java (right): http://codereview.chromium.org/8384012/diff/7001/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java#newcode30 compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java:30: import static com.google.dart.compiler.util.AstUtil.and; I've touched this file, but then ...
9 years, 1 month ago (2011-11-01 20:25:59 UTC) #10
zundel
LGTM
9 years, 1 month ago (2011-11-01 20:40:05 UTC) #11
Ben Laurie (Google)
http://codereview.chromium.org/8384012/diff/11004/tests/stub-generator/stub-generator.status File tests/stub-generator/stub-generator.status (right): http://codereview.chromium.org/8384012/diff/11004/tests/stub-generator/stub-generator.status#newcode11 tests/stub-generator/stub-generator.status:11: MintMakerFullyIsolatedTest : Skip # Bug 5365165 The problem here ...
9 years, 1 month ago (2011-11-02 18:08:34 UTC) #12
zundel
http://codereview.chromium.org/8384012/diff/11004/tests/stub-generator/stub-generator.status File tests/stub-generator/stub-generator.status (right): http://codereview.chromium.org/8384012/diff/11004/tests/stub-generator/stub-generator.status#newcode11 tests/stub-generator/stub-generator.status:11: MintMakerFullyIsolatedTest : Skip # Bug 5365165 On 2011/11/02 18:08:34, ...
9 years, 1 month ago (2011-11-02 18:16:58 UTC) #13
zundel
On 2011/11/02 18:16:58, zundel wrote: > http://codereview.chromium.org/8384012/diff/11004/tests/stub-generator/stub-generator.status > File tests/stub-generator/stub-generator.status (right): > > http://codereview.chromium.org/8384012/diff/11004/tests/stub-generator/stub-generator.status#newcode11 > ...
9 years, 1 month ago (2011-11-02 18:27:28 UTC) #14
Ben Laurie (Google)
9 years, 1 month ago (2011-11-02 18:48:30 UTC) #15
The problem is the stub generator doesn't take Dart-compliant code, it takes
nearly-Dart compliant code with unresolved types and produces code that makes
the original code compliant.

So, you can't completely kill warnOnNoSuchType without breaking the stub
generator.

Of course, you can set it to false for standard compiles.

Powered by Google App Engine
This is Rietveld 408576698