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

Issue 183743015: Fix type checks with malformed types (Closed)

Created:
6 years, 9 months ago by hausner
Modified:
6 years, 9 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Fix type checks with malformed types Parser must continue to parse the rest of an expression that contains a type test with a malformed type. Before: 'file:XXX’: error: line 5 pos 12: ')' expected if (3 is X && 2 == 2) print("foo"); After: 'file:XXX’: malformed type: line 5 pos 12: type 'X' is not loaded if (3 is X && 2 == 2) print("foo"); ^ type error. #0 main (file:XXX:5:12) #1 _startIsolate.isolateStartHandler (dart:isolate-patch/isolate_patch.dart:216) #2 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:115) R=regis@google.com Committed: https://code.google.com/p/dart/source/detail?r=33253

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -1 line) Patch
M runtime/vm/parser.cc View 1 1 chunk +4 lines, -1 line 1 comment Download
A tests/language/is_malformed_type_test.dart View 1 2 1 chunk +94 lines, -0 lines 0 comments Download
M tests/language/language.status View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M tests/language/language_analyzer.status View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
hausner
6 years, 9 months ago (2014-03-03 21:09:36 UTC) #1
regis
LGTM No test?
6 years, 9 months ago (2014-03-03 21:26:38 UTC) #2
hausner
Figuring out the test harness is more challenging than fixing the compiler bug. But here ...
6 years, 9 months ago (2014-03-03 23:26:00 UTC) #3
hausner
Committed patchset #3 manually as r33253 (presubmit successful).
6 years, 9 months ago (2014-03-03 23:27:49 UTC) #4
Florian Schneider
https://codereview.chromium.org/183743015/diff/40001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/183743015/diff/40001/runtime/vm/parser.cc#newcode7615 runtime/vm/parser.cc:7615: left_operand = ThrowTypeError(type_pos, type); I think you can use ...
6 years, 9 months ago (2014-03-04 09:48:24 UTC) #5
hausner
6 years, 9 months ago (2014-03-04 21:06:36 UTC) #6
Message was sent while issue was closed.
Thank you for the tip, Florian. Addressed in follow-up change
https://codereview.chromium.org/185553018/

Powered by Google App Engine
This is Rietveld 408576698