Chromium Code Reviews| Index: dart/tests/language/src/ThisTest.dart |
| diff --git a/dart/tests/language/src/ThisTest.dart b/dart/tests/language/src/ThisTest.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..df5a599be5f60d363cd88d996e746a76210fa0fa |
| --- /dev/null |
| +++ b/dart/tests/language/src/ThisTest.dart |
| @@ -0,0 +1,23 @@ |
| +// Copyright (c) 2012, 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. |
| + |
| +class Foo { |
| + var x; |
| + f() {} |
| + |
| + testMe() { |
|
ngeoffray
2012/03/17 16:22:42
How about this() ?
ahe
2012/03/17 16:32:57
I'll have to check up on the specification. I'm pr
|
| + x.this; /// 01: compile-time error |
| + x.this(); /// 02: compile-time error |
| + x.this.x; /// 03: compile-time error |
| + x.this().x; /// 04: compile-time error |
| + f().this; /// 05: compile-time error |
| + f().this(); /// 06: compile-time error |
| + f().this.f(); /// 07: compile-time error |
| + f().this().f(); /// 08: compile-time error |
| + } |
| +} |
| + |
| +main() { |
| + new Foo().testMe(); |
| +} |