File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
2
+ // for details. All rights reserved. Use of this source code is governed by a
3
+ // BSD-style license that can be found in the LICENSE file.
4
+
5
+ /// @assertion An expression is a fragment of Dart code that can be evaluated at
6
+ /// run time
7
+ /// ...
8
+ /// <expression> ::= <assignableExpression> <assignmentOperator> <expression>
9
+ /// | <conditionalExpression>
10
+ /// | <cascade>
11
+ /// | <throwExpression>
12
+ /// <expressionWithoutCascade> ::=
13
+ /// <assignableExpression> <assignmentOperator> <expressionWithoutCascade>
14
+ /// | <conditionalExpression>
15
+ /// | <throwExpressionWithoutCascade>
16
+ /// <expressionList> ::= <expression> (‘,’ <expression>)*
17
+ /// <primary> ::= <thisExpression>
18
+ /// | super <unconditionalAssignableSelector>
19
+ /// | super <argumentPart>
20
+ /// | <functionExpression>
21
+ /// | <literal>
22
+ /// | <identifier>
23
+ /// | <newExpression>
24
+ /// | <constObjectExpression>
25
+ /// | <constructorInvocation>
26
+ /// | ‘(’ <expression> ‘)’
27
+ /// <literal> ::= <nullLiteral>
28
+ /// | <booleanLiteral>
29
+ /// | <numericLiteral>
30
+ /// | <stringLiteral>
31
+ /// | <symbolLiteral>
32
+ /// | <listLiteral>
33
+ /// | <setOrMapLiteral>
34
+ /// @description Checks that `super` without selector or argument part cannot be
35
+ /// used as an expression
36
+
37
+ /// @issue 43168
38
+
39
+ class C {
40
+ foo () {
41
+ print (super );
42
+ // ^^^^^
43
+ // [analyzer] unspecified
44
+ // [cfe] unspecified
45
+ }
46
+ }
47
+
48
+ main () {
49
+ C ().foo ();
50
+ }
You can’t perform that action at this time.
0 commit comments