This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Value {} | |
class Renderer<T> {} | |
// When V is defined before R, type inference works in all cases. | |
class WorkingOrder<V extends Value, R extends Renderer<V>> {} | |
// When V is defined after R, type inference fails in some cases. | |
class BrokenOrder<R extends Renderer<V>, V extends Value> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef PathFunction = String Function([List<String> segment]); | |
PathFunction createPathFunction() { | |
// The type of this default list is not inferred from context. | |
// Typing the LHS or applying type arguments to the RHS fixes this. | |
return ([args = const []]) { | |
return '/${args.join('/')}'; | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13724c13724 | |
< var detectors, $length, i, t1; | |
--- | |
> var detectors, $length, i; | |
13729,13738d13728 | |
< if ($.$get$ChangeDetectionHost__enforceNoNewChanges()) | |
< for (i = 0; i < $length; ++i) { | |
< t1 = detectors[i]; | |
< $.AppViewUtils__throwOnChangesCounter = $.AppViewUtils__throwOnChangesCounter + 1; | |
< $.AppViewUtils_throwOnChanges = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16342c16342 | |
< if (firstCheck) { | |
--- | |
> if (firstCheck && !$.AppViewUtils_throwOnChanges) { | |
16362,16371c16362,16373 | |
< if (firstCheck) | |
< this._RouterLinkActive_5_6.ngAfterViewInit$0(); | |
< if (firstCheck) | |
< this._RouterLinkActive_8_6.ngAfterViewInit$0(); | |
< if (firstCheck) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DartType resolveGenerics(DartType type) { | |
if (type is TypeParameterType) { | |
return type.resolveToBound(dynamicType); // T --> dynamic. | |
} else if (type is ParameterizedType) { | |
// [T, ...] --> [dynamic, ...] | |
final resolvedTypeArguments = | |
type.typeArguments.map(resolveTypeParameters).toList(); | |
// Fails on nested unbounded type arguments. | |
// * List<T>.instantiate([dynamic]) --> List<dynamic> | |
// * List<Foo<T>>.instantiate([Foo<dynamic>]) --> List<Foo<T>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:angular/angular.dart'; | |
@Component( | |
selector: 'greet', | |
template: '<p>Hello {{name}}!</p>', | |
) | |
class GreetComponent { | |
String name; | |
} |
NewerOlder