Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library test.src.serialization.elements_test; | 5 library test.src.serialization.elements_test; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/constant/value.dart'; | 10 import 'package:analyzer/dart/constant/value.dart'; |
| (...skipping 3339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3350 addLibrarySource( | 3350 addLibrarySource( |
| 3351 '/b.dart', 'abstract class E { void f(int x, int g(String s)); }'); | 3351 '/b.dart', 'abstract class E { void f(int x, int g(String s)); }'); |
| 3352 checkLibrary('import "a.dart"; class C extends D { void f(int x, g) {} }'); | 3352 checkLibrary('import "a.dart"; class C extends D { void f(int x, g) {} }'); |
| 3353 } | 3353 } |
| 3354 | 3354 |
| 3355 test_inferred_type_refers_to_method_function_typed_parameter_type() { | 3355 test_inferred_type_refers_to_method_function_typed_parameter_type() { |
| 3356 checkLibrary('class C extends D { void f(int x, g) {} }' | 3356 checkLibrary('class C extends D { void f(int x, g) {} }' |
| 3357 ' abstract class D { void f(int x, int g(String s)); }'); | 3357 ' abstract class D { void f(int x, int g(String s)); }'); |
| 3358 } | 3358 } |
| 3359 | 3359 |
| 3360 test_inferred_type_refers_to_nested_function_typed_param_of_typedef() { | |
|
scheglov
2016/05/06 16:49:43
Is it really "of typedef"?
Paul Berry
2016/05/06 16:54:37
Oops. No, it's not.
Fixed.
| |
| 3361 checkLibrary(''' | |
| 3362 f(void g(int x, void h())) => null; | |
| 3363 var v = f((x, y) {}); | |
| 3364 '''); | |
| 3365 } | |
| 3366 | |
| 3367 test_inferred_type_refers_to_nested_function_typed_param_of_typedef_named() { | |
| 3368 checkLibrary(''' | |
| 3369 f({void g(int x, void h())}) => null; | |
| 3370 var v = f(g: (x, y) {}); | |
| 3371 '''); | |
| 3372 } | |
| 3373 | |
| 3360 test_inferred_type_refers_to_setter_function_typed_parameter_type() { | 3374 test_inferred_type_refers_to_setter_function_typed_parameter_type() { |
| 3361 checkLibrary('class C extends D { void set f(g) {} }' | 3375 checkLibrary('class C extends D { void set f(g) {} }' |
| 3362 ' abstract class D { void set f(int g(String s)); }'); | 3376 ' abstract class D { void set f(int g(String s)); }'); |
| 3363 } | 3377 } |
| 3364 | 3378 |
| 3365 test_initializer_executable_with_return_type_from_closure() { | 3379 test_initializer_executable_with_return_type_from_closure() { |
| 3366 checkLibrary('var v = () => 0;'); | 3380 checkLibrary('var v = () => 0;'); |
| 3367 } | 3381 } |
| 3368 | 3382 |
| 3369 test_initializer_executable_with_return_type_from_closure_field() { | 3383 test_initializer_executable_with_return_type_from_closure_field() { |
| (...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4394 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4408 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 4395 } | 4409 } |
| 4396 return serializedUnit; | 4410 return serializedUnit; |
| 4397 } | 4411 } |
| 4398 | 4412 |
| 4399 @override | 4413 @override |
| 4400 bool hasLibrarySummary(String uri) { | 4414 bool hasLibrarySummary(String uri) { |
| 4401 return true; | 4415 return true; |
| 4402 } | 4416 } |
| 4403 } | 4417 } |
| OLD | NEW |