[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #36853] Propagate type parameters
From: |
Per Bothner |
Subject: |
[Bug-kawa] [bug #36853] Propagate type parameters |
Date: |
Tue, 17 Jul 2012 19:48:06 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.41 Safari/537.1 |
Follow-up Comment #5, bug #36853 (project kawa):
The problem in the example in comment #4 doesn't seem to be related to type
parameters. Note there are no warnings if the function f is inlined.
The problem is that call to f first "validates" (type-checks) the function
(i.e. the lambda) before validating the arguments. Usually, that's what you
want, so you can type-check the actual argument using the specified type of
the formal parameter. But if the formal parameter does't have type specifier,
then you'd like to validate the actual argument, and infer the parameter type
from that. In principle this shouldn't be too hard, at least when there is
only a single call site, but re-factoring the code to support that looks
tricky. Another complication is that the same pass also check things like if
a variable is initialized, which makes doing things in the right order even
more difficult.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36853>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/