Add support for exporting Carbon functions as constructors. (#7560)

Co-authored-by: Nicholas Bishop <nbishop@nbishop.net>
This commit is contained in:
Geoff Romer
2026-07-24 18:43:12 +00:00
committed by GitHub
co-authored by Nicholas Bishop
parent de68b19784
commit 3cb143e878
7 changed files with 576 additions and 100 deletions
@@ -373,6 +373,7 @@ void G() {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%A
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: .A = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @B {
@@ -386,6 +387,7 @@ void G() {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%B
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: .B = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @I.WithSelf.Doit(@I.%Self: %I.type) {