|
|
Chromium Code Reviews|
Created:
6 years, 8 months ago by ahe Modified:
6 years, 8 months ago Reviewers:
Johnni Winther CC:
reviews_dartlang.org Visibility:
Public. |
DescriptionComplain if there are pending classes.
R=johnniwinther@google.com
Committed: https://code.google.com/p/dart/source/detail?r=35420
Patch Set 1 #Patch Set 2 : #Patch Set 3 : Merged with r35419. #Patch Set 4 : Update expectations for parser tests #
Messages
Total messages: 11 (0 generated)
Johnni, why does tests/compiler/dart2js/message_kind_test.dart fail with this
CL:
Checking 'TYPEDEF_FORMAL_WITH_DEFAULT'.
memory:main.dart:1:27:
Error: A parameter of a typedef can't specify a default value.
Try removing the default value.
typedef void F([int arg = 0]);
^
memory:main.dart:1:26:
Error: A parameter of a typedef can't specify a default value.
Try removing the default value.
typedef void F({int arg: 0});
^
sdk/lib/core/int.dart:20:1:
Info: Pending class to be resolved.
abstract class int extends num {
^^^^^^^^
Uncaught Error: Stuff was pending
Stack Trace:
#0 check.<anonymous closure>
(file:///Users/ahe/Dart/all/dart/tests/compiler/dart2js/message_kind_helper.dart:83:9)
#1 _rootRunUnary (dart:async/zone.dart:730)
#2 _RootZone.runUnary (dart:async/zone.dart:864)
#3 _Future._propagateToListeners.handleValueCallback
(dart:async/future_impl.dart:488)
#4 _Future._propagateToListeners (dart:async/future_impl.dart:571)
#5 _Future._complete (dart:async/future_impl.dart:317)
#6 Future.forEach.nextElement (dart:async/future.dart:302)
#7 _rootRunUnary (dart:async/zone.dart:730)
#8 _RootZone.runUnary (dart:async/zone.dart:864)
#9 _Future._propagateToListeners.handleValueCallback
(dart:async/future_impl.dart:488)
#10 _Future._propagateToListeners (dart:async/future_impl.dart:571)
#11 _Future._complete (dart:async/future_impl.dart:317)
#12 Future.forEach.nextElement (dart:async/future.dart:302)
#13 _rootRunUnary (dart:async/zone.dart:730)
#14 _RootZone.runUnary (dart:async/zone.dart:864)
#15 _Future._propagateToListeners.handleValueCallback
(dart:async/future_impl.dart:488)
#16 _Future._propagateToListeners (dart:async/future_impl.dart:571)
#17 _Future._completeWithValue (dart:async/future_impl.dart:331)
#18 _Future._asyncComplete.<anonymous closure>
(dart:async/future_impl.dart:393)
#19 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#20 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#21 _RawReceivePortImpl._handleMessage
(dart:isolate-patch/isolate_patch.dart:120)
Unhandled exception:
Stuff was pending
#0 _rootHandleUncaughtError.<anonymous closure>.<anonymous closure>
(dart:async/zone.dart:713)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#3 _asyncRunCallback (dart:async/schedule_microtask.dart:36)
#4 _RawReceivePortImpl._handleMessage
(dart:isolate-patch/isolate_patch.dart:120)
On 2014/04/10 14:47:04, ahe wrote:
> Johnni, why does tests/compiler/dart2js/message_kind_test.dart fail with this
> CL:
>
> Checking 'TYPEDEF_FORMAL_WITH_DEFAULT'.
> memory:main.dart:1:27:
> Error: A parameter of a typedef can't specify a default value.
> Try removing the default value.
> typedef void F([int arg = 0]);
> ^
> memory:main.dart:1:26:
> Error: A parameter of a typedef can't specify a default value.
> Try removing the default value.
> typedef void F({int arg: 0});
> ^
> sdk/lib/core/int.dart:20:1:
> Info: Pending class to be resolved.
> abstract class int extends num {
> ^^^^^^^^
> Uncaught Error: Stuff was pending
> Stack Trace:
> #0 check.<anonymous closure>
>
(file:///Users/ahe/Dart/all/dart/tests/compiler/dart2js/message_kind_helper.dart:83:9)
> #1 _rootRunUnary (dart:async/zone.dart:730)
> #2 _RootZone.runUnary (dart:async/zone.dart:864)
> #3 _Future._propagateToListeners.handleValueCallback
> (dart:async/future_impl.dart:488)
> #4 _Future._propagateToListeners (dart:async/future_impl.dart:571)
> #5 _Future._complete (dart:async/future_impl.dart:317)
> #6 Future.forEach.nextElement (dart:async/future.dart:302)
> #7 _rootRunUnary (dart:async/zone.dart:730)
> #8 _RootZone.runUnary (dart:async/zone.dart:864)
> #9 _Future._propagateToListeners.handleValueCallback
> (dart:async/future_impl.dart:488)
> #10 _Future._propagateToListeners (dart:async/future_impl.dart:571)
> #11 _Future._complete (dart:async/future_impl.dart:317)
> #12 Future.forEach.nextElement (dart:async/future.dart:302)
> #13 _rootRunUnary (dart:async/zone.dart:730)
> #14 _RootZone.runUnary (dart:async/zone.dart:864)
> #15 _Future._propagateToListeners.handleValueCallback
> (dart:async/future_impl.dart:488)
> #16 _Future._propagateToListeners (dart:async/future_impl.dart:571)
> #17 _Future._completeWithValue (dart:async/future_impl.dart:331)
> #18 _Future._asyncComplete.<anonymous closure>
> (dart:async/future_impl.dart:393)
> #19 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
> #20 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
> #21 _RawReceivePortImpl._handleMessage
> (dart:isolate-patch/isolate_patch.dart:120)
>
>
> Unhandled exception:
> Stuff was pending
> #0 _rootHandleUncaughtError.<anonymous closure>.<anonymous closure>
> (dart:async/zone.dart:713)
> #1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
> #2 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
> #3 _asyncRunCallback (dart:async/schedule_microtask.dart:36)
> #4 _RawReceivePortImpl._handleMessage
> (dart:isolate-patch/isolate_patch.dart:120)
Because TYPEDEF_FORMAL_WITH_DEFAULT is reported as a _fatal_ error.
On 2014/04/10 14:59:36, Johnni Winther wrote: > Because TYPEDEF_FORMAL_WITH_DEFAULT is reported as a _fatal_ error. That sounds like a bug. I would have expected that new errors wouldn't be fatal.
On 2014/04/10 15:03:55, ahe wrote: > On 2014/04/10 14:59:36, Johnni Winther wrote: > > Because TYPEDEF_FORMAL_WITH_DEFAULT is reported as a _fatal_ error. > > That sounds like a bug. I would have expected that new errors wouldn't be fatal. The error is new, the error reporting method is old: CommonResolverVisitor.error().
On 2014/04/10 15:21:14, Johnni Winther wrote: > On 2014/04/10 15:03:55, ahe wrote: > > On 2014/04/10 14:59:36, Johnni Winther wrote: > > > Because TYPEDEF_FORMAL_WITH_DEFAULT is reported as a _fatal_ error. > > > > That sounds like a bug. I would have expected that new errors wouldn't be > fatal. > > The error is new, the error reporting method is old: > CommonResolverVisitor.error(). Yes. Normally, you would use compiler.reportError instead. Do you agree with this principle: when you add a new error, you should use reportError?
On 2014/04/10 15:22:59, ahe wrote: > On 2014/04/10 15:21:14, Johnni Winther wrote: > > On 2014/04/10 15:03:55, ahe wrote: > > > On 2014/04/10 14:59:36, Johnni Winther wrote: > > > > Because TYPEDEF_FORMAL_WITH_DEFAULT is reported as a _fatal_ error. > > > > > > That sounds like a bug. I would have expected that new errors wouldn't be > > fatal. > > > > The error is new, the error reporting method is old: > > CommonResolverVisitor.error(). > > Yes. Normally, you would use compiler.reportError instead. Do you agree with > this principle: when you add a new error, you should use reportError? Yes. It hasn't happened here because the error method is not called directly but shared with 2 old message kinds.
On 2014/04/10 15:28:48, Johnni Winther wrote: > On 2014/04/10 15:22:59, ahe wrote: > > On 2014/04/10 15:21:14, Johnni Winther wrote: > > > On 2014/04/10 15:03:55, ahe wrote: > > > > On 2014/04/10 14:59:36, Johnni Winther wrote: > > > > > Because TYPEDEF_FORMAL_WITH_DEFAULT is reported as a _fatal_ error. > > > > > > > > That sounds like a bug. I would have expected that new errors wouldn't be > > > fatal. > > > > > > The error is new, the error reporting method is old: > > > CommonResolverVisitor.error(). > > > > Yes. Normally, you would use compiler.reportError instead. Do you agree with > > this principle: when you add a new error, you should use reportError? > > Yes. It hasn't happened here because the error method is not called directly but > shared with 2 old message kinds. OK. I'll probably fix it, and also try to make sure message_kind_test.dart fails if a fatal error is reported during execution. Sounds good?
On 2014/04/10 15:30:50, ahe wrote: > On 2014/04/10 15:28:48, Johnni Winther wrote: > > On 2014/04/10 15:22:59, ahe wrote: > > > On 2014/04/10 15:21:14, Johnni Winther wrote: > > > > On 2014/04/10 15:03:55, ahe wrote: > > > > > On 2014/04/10 14:59:36, Johnni Winther wrote: > > > > > > Because TYPEDEF_FORMAL_WITH_DEFAULT is reported as a _fatal_ error. > > > > > > > > > > That sounds like a bug. I would have expected that new errors wouldn't > be > > > > fatal. > > > > > > > > The error is new, the error reporting method is old: > > > > CommonResolverVisitor.error(). > > > > > > Yes. Normally, you would use compiler.reportError instead. Do you agree with > > > this principle: when you add a new error, you should use reportError? > > > > Yes. It hasn't happened here because the error method is not called directly > but > > shared with 2 old message kinds. > > OK. I'll probably fix it, and also try to make sure message_kind_test.dart fails > if a fatal error is reported during execution. Sounds good? Yes.
Updated per our conversation. Please review.
lgtm
Message was sent while issue was closed.
Committed patchset #4 manually as r35420 (presubmit successful). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
