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

Unified Diff: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java

Issue 10541159: Generate inferred types using all implemented interfaces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « compiler/java/com/google/dart/compiler/type/Types.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
index 2f2b3191a999d7b34eaaed339e2af25e1be772f8..a2be1b4283495c302d38a0f88c677e700a060c4d 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -1971,6 +1971,19 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
assertInferredElementTypeString(libraryResult, "v2", "double");
assertInferredElementTypeString(libraryResult, "v3", "double");
}
+
+ public void test_typesPropagation_FunctionAliasType() throws Exception {
+ AnalyzeLibraryResult libraryResult = analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "typedef F();",
+ "foo(F f) {",
+ " var v = f;",
+ " v();",
+ "}",
+ "",
+ "");
+ assertInferredElementTypeString(libraryResult, "v", "F");
+ }
public void test_getType_binaryExpression() throws Exception {
AnalyzeLibraryResult libraryResult = analyzeLibrary(
« no previous file with comments | « compiler/java/com/google/dart/compiler/type/Types.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698