Avatar
Avatar
kntk
@swift-5.5.3 @swift-5.10.1 -frontend -dump-ast -debug-constraints func f(_ a: Int?) {} func f(_ a: Any) {} f(3) (edited)
swift55 BOT 4/3/2024 6:20 PM
(source_file "<stdin>" (func_decl range=[<stdin>:1:1 - line:1:20] "f(_:)" interface type='(Int?) -> ()' access=internal (parameter_list range=[<stdin>:1:7 - line:1:17] (parameter "a" type='Int?' interface type='Int?')) (brace_stmt range=[<stdin>:1:19 - line:1:20])) (func_decl range=[<stdin>:3:1 - line:3:19] "f(_:)" interface type='(Any) -> ()' access=internal (parameter_list range=[<stdin>:3:7 - line:3:16] (parameter "a" type='Any' interface type='Any')) (brace_stmt range=[<stdin>:3:18 - line:3:19])) (top_level_code_decl range=[<stdin>:5:1 - line:5:4] (brace_stmt implicit range=[<stdin>:5:1 - line:5:4] (call_expr type='()' location=<stdin>:5:1 range=[<stdin>:5:1 - line:5:4] nothrow arg_labels=_: (declref_expr type='(Any) -> ()' location=<stdin>:5:1 range=[<stdin>:5:1 - line:5:1] decl=main.(file).f@<stdin>:3:6 function_ref=single) (paren_expr type='(Any)' location=<stdin>:5:3 range=[<stdin>:5:2 - line:5:4] (erasure_expr implicit type='Any' location=<stdin>:5:3 range=[<stdin>:5:3 - line:5:3] (integer_literal_expr type='Int' location=<stdin>:5:3 range=[<stdin>:5:3 - line:5:3] value=3 builtin_initializer=Swift.(file).Int.init(_builtinIntegerLiteral:) initializer=**NULL**)))))))---Constraint solving at [<stdin>:5:1 - line:5:4]--- (common result type for $T0 is ()) ---Initial constraints for the given expression--- (edited)
5.26 KB