Open sgrekhov opened 4 years ago
As I read the current language grammar in the spec, the sequence super!
is not allowed at all.
So, it's correct to have a compile-time error, but the error message is misleading.
The keyword super
is always followed by either an \!
, or a binary operator, which also cannot be !
.
\
::= ... \alt \SUPER{} \ \
::= ... \alt \SUPER{} \ \
::= `[' \ `]' \alt `.' \ \
::= ... \alt \SUPER{} \ \
::= ... \alt \SUPER{} \ \ ... etc ...
The only exception tot hat is the \
\
::= ... \alt (\ | \ ) \SUPER{}
and a \!
operator (or any suffix operator) because of precedence.
The \!
can only follow a constructor invocation or a primary, and as shown above super
by itself is not a primary, it has to be followed by an unconditional non-!
selector to become a primary.
The following test fails on DDC
An error is (https://dart-ci.appspot.com/log/ddc-nnbd-linux-release-chrome/dartdevk-strong-linux-release-chrome/1641/co19/LanguageFeatures/nnbd/null_check_operator_A04_t01/01)