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

Unified Diff: tests/compiler/dart2js/type_checker_test.dart

Issue 938173004: Small fixes in preparation for SemanticVisitor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/analyze_unused_dart2js_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/type_checker_test.dart
diff --git a/tests/compiler/dart2js/type_checker_test.dart b/tests/compiler/dart2js/type_checker_test.dart
index 44c2bc892532035e13277f487b75916a07b2ac58..adf75131ee0df80e659b329dbaf8427dd801ea1d 100644
--- a/tests/compiler/dart2js/type_checker_test.dart
+++ b/tests/compiler/dart2js/type_checker_test.dart
@@ -1358,6 +1358,8 @@ void testTypeLiteral(MockCompiler compiler) {
// Check access in assignment.
check('m(Type val) => val = Class;');
check('m(int val) => val = Class;', warnings: NOT_ASSIGNABLE);
+ check('m(Type val) => val = dynamic;');
+ check('m(int val) => val = dynamic;', warnings: NOT_ASSIGNABLE);
// Check access as argument.
check('m(Type val) => m(int);');
@@ -1374,6 +1376,10 @@ void testTypeLiteral(MockCompiler compiler) {
// Check static method access.
check('m() => Class.method();');
check('m() => (Class).method();', warnings: MessageKind.METHOD_NOT_FOUND);
+
+ // Check access in invocation.
+ check('m() => Class();', warnings: MessageKind.NOT_CALLABLE);
+ check('m() => dynamic();', warnings: MessageKind.NOT_CALLABLE);
}
Future testInitializers(MockCompiler compiler) {
« no previous file with comments | « tests/compiler/dart2js/analyze_unused_dart2js_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698