mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:56:57 +00:00
Add support for super expressions
Change-Id: I7d78810ca7fe8f669370803f2dd8146379ca2f7b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106164 Commit-Queue: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Paul Berry <paulberry@google.com>
This commit is contained in:
parent
9a2eecf67f
commit
071a99bfbe
|
@ -547,7 +547,7 @@ $stackTrace''');
|
|||
|
||||
@override
|
||||
DecoratedType visitSuperExpression(SuperExpression node) {
|
||||
throw new UnimplementedError('TODO(brianwilkerson)');
|
||||
return DecoratedType(node.staticType, _graph.never);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -1216,6 +1216,16 @@ String f() {
|
|||
assertNoUpstreamNullability(decoratedTypeAnnotation('String').node);
|
||||
}
|
||||
|
||||
test_superExpression() async {
|
||||
await analyze('''
|
||||
class C {
|
||||
C f() => super;
|
||||
}
|
||||
''');
|
||||
|
||||
assertNoUpstreamNullability(decoratedTypeAnnotation('C f').node);
|
||||
}
|
||||
|
||||
test_symbolLiteral() async {
|
||||
await analyze('''
|
||||
Symbol f() {
|
||||
|
|
Loading…
Reference in a new issue