unit u4; interface uses WPFObjects; type TClass = class f := Window; function myf := Window; end; implementation uses WPFObjects; procedure f; begin var w := Window; end; begin var w := Window; end.