You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Analyzer is OK here, it produces compile error on the line 15, no crash with this.
Please note that:
Dart does not crash here if I comment line 4 and uncomment line 5, i.e. if I use covariant or contravariant function parameter (typedef G<X> = X Function()) instead of unused one (typedef G<X> = void Function()).
Dart does not crash if I comment line 18 in the source code above, i.e. crash does not happen for F<A<dynamic>>, F<A<G<dynamic>>>, F<A<G<A<dynamic>>>> variables and dart crashes for F<A<G<A<G<dynamic>>>>> and so on.
I suspect this had to do with missing front-end errors. It now errors gracefully:
$ $ dartanalyzer 35064.dart
Analyzing 35064.dart...
error • A value of type 'void Function<Y extends A<void Function()>>()' can't be assigned to a variable of type 'void Function<Y extends A<dynamic>>()' at 35064.dart:16:27 • invalid_assignment
1 error found.
$ dart 35064.dart
35064.dart:16:27: Error: A value of type 'void Function<Y extends A<void Function()>>()' can't be assigned to a variable of type 'void Function<Y extends A<dynamic>>()'.
- 'A' is from '35064.dart'.
Try changing the type of the left hand side, or casting the right hand side to 'void Function<Y extends A<dynamic>>()'.
F<A<dynamic>> target1 = fsource; // compile-error
Dart SDK Version: 2.1.0-dev.9.1
OS: Windows 10 (64 bit)
Dart crashes with StackOverflow when compile the following test example:
Analyzer is OK here, it produces compile error on the line 15, no crash with this.
Please note that:
typedef G<X> = X Function()
) instead of unused one (typedef G<X> = void Function()
).F<A<dynamic>>
,F<A<G<dynamic>>>
,F<A<G<A<dynamic>>>>
variables and dart crashes forF<A<G<A<G<dynamic>>>>>
and so on.Dart sample output is:
The text was updated successfully, but these errors were encountered: