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

Side by Side Diff: tests/language/src/AssignStaticTypeTest.dart

Issue 9581032: New test exposes some bugs in the static analysis (dartc) engine on assignment problems (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: new test for static analysis. Created 8 years, 9 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
« no previous file with comments | « tests/language/language.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012, 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 // This test insures that statically initialized variables, fields, and paramete rs
6 // report static type warnings.
7
8
9 int a = "String"; /// 01: static type error
gbracha 2012/03/05 16:51:08 Could we change all the comments 01 -06 in class A
zundel 2012/03/05 17:37:48 I agree it has caused lots of confusion. I will ma
10
11 class A {
12 static final int c = "String"; /// 02: static type error
13 final int d = "String"; /// 03: static type error
14 int e = "String"; /// 04: static type error
15 A() {
16 int f = "String"; /// 05: static type error
17 }
18 method([
19 int /// 06: static type error
20 g = "String"]) {
21 return g;
22 }
23 }
24
25 int main() {
26 var w = a; /// 01: continued
27 var x;
28 x = A.c; /// 02: continued
29 var v = new A();
30 x = v.d; /// 03: continued
31 x = v.e; /// 04: continued
32 x = v.method(1); /// 06: continued
33 }
OLDNEW
« no previous file with comments | « tests/language/language.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698