Open eernstg opened 3 years ago
Consider the following program:
typedef F<X> = Function<Y extends G<X>>(); typedef G<X> = Function(F<X>); void main() {}
This program causes the front end (of 98c83633a2b54dd1709ddc1ee2a559214678be2b as well as 2.13.0-48.0.dev) to crash as follows:
Crash when compiling null, at character offset null: Bad state: Can't compute nullability from an absent bound. #0 TypeParameterType.computeNullabilityFromBound (package:kernel/ast.dart:9664:7) #1 new TypeParameterType.forAlphaRenaming (package:kernel/ast.dart:9532:18) #2 _InnerTypeSubstitutor.freshTypeParameter (package:kernel/type_algebra.dart:386:13) #3 MappedListIterable.elementAt (dart:_internal/iterable.dart:412:31) #4 ListIterator.moveNext (dart:_internal/iterable.dart:341:26) #5 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:188:27) #6 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28) #7 new List.of (dart:core-patch/array_patch.dart:50:28) #8 ListIterable.toList (dart:_internal/iterable.dart:212:44) #9 _TypeSubstitutor.freshTypeParameters (package:kernel/type_algebra.dart:523:47) #10 _TypeSubstitutor.visitFunctionType (package:kernel/type_algebra.dart:553:15) #11 FunctionType.accept (package:kernel/ast.dart:8998:42) #12 _TypeSubstitutor.visit (package:kernel/type_algebra.dart:488:41) ...
cc @stefantsov
Consider the following program:
This program causes the front end (of 98c83633a2b54dd1709ddc1ee2a559214678be2b as well as 2.13.0-48.0.dev) to crash as follows: