blob: 0cd4ff87c3ad2dfa4850ca5b04f4671d46706920 [file] [log] [blame]
/*
* Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @assertion Assignable expressions are expressions that can appear on the left hand side of
* an assignment.
* assignableExpression:
* primary (arguments* assignableSelector)+ |
* super assignableSelector |
* identifier
* ;
* assignableSelector:
* '[' expression ']' |
* '.' identifier
* ;
* primary:
* thisExpression |
* super assignableSelector |
* functionExpression |
* literal |
* identifier |
* newExpression |
* constantObjectExpression |
* '(' expression ')'
* ;
* literal:
* nullLiteral |
* booleanLiteral |
* numericLiteral |
* stringLiteral |
* symbolLiteral |
* mapLiteral |
* listLiteral
* ;
* @description Checks that super with an assignableSelector
* can be used in the left hand side of an assignment.
* @author msyabro
* @reviewer kaigorodov
*/
class S {
operator[](var index) {}
operator[]=(var index, var value) {}
var prop;
}
class A extends S {
test() {
super["key"] = null;
super.prop = null;
}
}
main() {
A a = new A();
a.test();
}