Skip to content

Commit

Permalink
test issue #19
Browse files Browse the repository at this point in the history
  • Loading branch information
rpau committed Mar 20, 2016
1 parent 544c338 commit e8bfe7f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2011,4 +2011,12 @@ public void testTemplateParametersWithNullValues() throws Exception{
CompilationUnit cu = run("public class ClassLiteral { <T> T doClass(String x, Class<T> clazz) {return null;}public void x() { doClass(\"x\", null); }}");
Assert.assertNotNull(cu);
}

@Test
public void testTypePropagation() throws Exception{
CompilationUnit cu = run("public class Foo{ public static <T> T capture(final Capture<T> captured) { return null; } public void doFile(java.io.File f){} void x(){ final FileContentCapture capturedFileContent = new FileContentCapture(); doFile(capture(capturedFileContent)); } }",
"public class FileContentCapture extends Capture<java.io.File> {}",
"public class Capture<T>{}");
Assert.assertNotNull(cu);
}
}

0 comments on commit e8bfe7f

Please sign in to comment.