﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
9	Unconstrained dtype return values are closed in unification	Rob Schluntz	Rob Schluntz	"{{{
#include <stdlib>
int main() {
    int * i;
    i = malloc();
}

cfa test.c
CFA Version 1.0.0 (debug)
test.c:2 error: Types:
  _2_DT -> instance of type _71_T (not function type) 
  _36_DT -> signed int
Non-types:

unbound type variable: _71_T in application Application of
  Variable Expression: malloc: forall
        T: sized incomplete type
      function
      returning 
        _retval_malloc: pointer to instance of type T (not function type) 
}}}

The dtype T is only used as the return value of malloc, i.e., T does not occur in the parameter list or any type assertion (other than the pseudo-assertion ""sized""), so by the time it is seen in the assignment call ?=?(&i, malloc()) T is a closed type variable and the unification of T and int* fails."	defect	closed	major	cfa-cc	1.0	fixed	dtype unify unification malloc return	
