var i := 123; // inferred type of i is Integer var s := 'abc'; // inferred type of s is String var o := TObject.Create; // inferred type of o is TObject var s2 := o.ClassName; // inferred type of s2 is String as that's the type returned by ClassName