mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Completing a type no longer ignores facet types (#5004)
Make facet types complete like other types. This means that in the body of an interface, the type of `Self` is incomplete. This involved fixing an issue where eval of a specific_id that was already canonical was not resolving the specific declaration, which could occur as part of substituting into a facet type. --------- Co-authored-by: Josh L <josh11b@users.noreply.github.com> Co-authored-by: Richard Smith <richard@metafoo.co.uk> Co-authored-by: Dana Jansens <danakj@orodu.net>
This commit is contained in:
co-authored by
Josh L
Richard Smith
Dana Jansens
parent
1d48270dc4
commit
3ebd098597
-12
@@ -16,11 +16,6 @@ interface I {
|
||||
// you can't pass a facet around at runtime, so make sure it works.
|
||||
fn F(T: I) -> I { return T; }
|
||||
|
||||
interface J;
|
||||
|
||||
// Declared-but-not-defined interfaces are still complete types.
|
||||
fn G(T: J) {}
|
||||
|
||||
// CHECK:STDOUT: ; ModuleID = 'basic.carbon'
|
||||
// CHECK:STDOUT: source_filename = "basic.carbon"
|
||||
// CHECK:STDOUT:
|
||||
@@ -29,11 +24,6 @@ fn G(T: J) {}
|
||||
// CHECK:STDOUT: ret void, !dbg !7
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @_CG.Main() !dbg !8 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !9
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!0, !1}
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!2}
|
||||
// CHECK:STDOUT:
|
||||
@@ -45,5 +35,3 @@ fn G(T: J) {}
|
||||
// CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
|
||||
// CHECK:STDOUT: !6 = !{}
|
||||
// CHECK:STDOUT: !7 = !DILocation(line: 17, column: 19, scope: !4)
|
||||
// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !9 = !DILocation(line: 22, column: 1, scope: !8)
|
||||
|
||||
Reference in New Issue
Block a user