Skip to content

Commit e17ce49

Browse files
author
dlsmith
committed
DynamicJava: Explicit type arguments can now be used for unqualified method invocations ("x = <String>foo(23)").
git-svn-id: file:///tmp/test-svn/trunk@5111 fe72c1cf-3628-48e9-8b72-1c46755d3cff
1 parent a191320 commit e17ce49

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

dynamicjava/src/edu/rice/cs/dynamicjava/interpreter/ExpressionChecker.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ public void checkConstructorCall(ConstructorCall node) {
179179

180180
Iterable<? extends Expression> args = node.getArguments();
181181
checkList(args);
182-
183-
// TODO: implement explicit type arguments in constructor calls
184182
Iterable<Type> targs = IterUtil.empty();
183+
// TODO: parse explicit type arguments in constructor calls
184+
//Iterable<Type> targs = checkTypeNameList(node.getTypeArgs().unwrap(Collections.<TypeName>emptyList()));
185185

186186
Type type;
187187
if (node.isSuper()) { type = context.getThis().immediateSuperclass(); }
@@ -634,8 +634,7 @@ private DJClass resolveThis(Option<String> outerName, Node node) {
634634
@Override public Type visit(SimpleMethodCall node) {
635635
Iterable<? extends Expression> args = node.getArguments();
636636
checkList(args);
637-
638-
Iterable<Type> targs = IterUtil.empty();
637+
Iterable<Type> targs = checkTypeNameList(node.getTypeArgs().unwrap(Collections.<TypeName>emptyList()));
639638

640639
Type t;
641640
if (context.localFunctionExists(node.getMethodName(), ts)) {

0 commit comments

Comments
 (0)