Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: tests/language/instance_creation_in_function_annotation_test.dart

Issue 1125613003: Make sure to visit function annotations in ElementBuilder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2015, 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 // Verify that instance creation expressions inside function
6 // annotations are properly handled. See dartbug.com/23354
7
8 import 'dart:mirrors';
9 import 'package:expect/expect.dart';
10
11 class C {
12 final String s;
13 const C(this.s);
14 }
15
16 class D {
17 final C c;
18 const D(this.c);
19 }
20
21 @D(const C('foo'))
22 f() {}
23
24 main() {
25 ClosureMirror closureMirror = reflect(f);
26 List<InstanceMirror> metadata = closureMirror.function.metadata;
27 Expect.equals(1, metadata.length);
28 Expect.equals(metadata[0].reflectee.c.s, 'foo');
29 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/non_error_resolver_test.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698