mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 18:20:09 +01:00
The general strategy here is to import the constructor with a signature that directly matches the argument. The intent is that the imported function will eventually be usable directly as the `ImplicitAs.Convert` function in a generated `impl`. For initialization from a tuple, for example `(1, 2)`, we import the selected constructor with a signature that takes a tuple pattern: `fn Class.Class((a: i32, b: i32)) -> Class;` In order to support that, this PR also adds support in general for tuple patterns in function signatures. It turns out the implementation was already very close to allowing this. Assisted-by: Gemini 3 Pro via Antigravity