|
From: | Helmut Eller |
Subject: | [Bug-kawa] [bug #36853] Propagate type parameters |
Date: | Mon, 16 Jul 2012 15:12:08 +0000 |
User-agent: | Opera/9.80 (X11; Linux i686; U; en) Presto/2.10.289 Version/12.00 |
URL: <http://savannah.gnu.org/bugs/?36853> Summary: Propagate type parameters Project: Kawa Submitted by: ellerh Submitted on: Mon 16 Jul 2012 03:12:07 PM GMT Category: Type declaration and inference Severity: 3 - Normal Item Group: Feature Request Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: This example: (define (my-member (key String) (strings java.util.List[String])) (let ((iter (strings:iterator))) (let loop () (if (iter:hasNext) (let ((next (iter:next))) (if (eq? (next:intern) key) #t (loop))) #f)))) generates this warning: x.scm:7:15: warning - no known slot 'intern' in java.lang.Object It would be nice if the compiler would automatically infer that the type of iter is Iterator[String] and consequently the type of next is String. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?36853> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |