Skip to content

Commit 68020bd

Browse files
author
David Ungar
authored
Merge pull request #18378 from davidungar/rdar-42314665-produce-diagnostics
Don’t mangle an error type.
2 parents dc70c69 + 00ed75e commit 68020bd

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

lib/AST/USRGeneration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ bool ide::printDeclUSR(const ValueDecl *D, raw_ostream &OS) {
226226
return printObjCUSR(D, OS);
227227
}
228228

229-
if (!D->hasInterfaceType())
229+
if (!D->hasInterfaceType() || D->getInterfaceType()->hasError())
230230
return true;
231231

232232
// Invalid code.

test/SourceKit/Indexing/index_constructors.swift.response

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,6 @@
3333
key.line: 6,
3434
key.column: 21
3535
},
36-
{
37-
key.kind: source.lang.swift.decl.var.instance,
38-
key.name: "name",
39-
key.usr: "s:18index_constructors11HorseObjectC4nameXevp",
40-
key.line: 7,
41-
key.column: 7,
42-
key.entities: [
43-
{
44-
key.kind: source.lang.swift.decl.function.accessor.getter,
45-
key.usr: "s:18index_constructors11HorseObjectC4nameXevg",
46-
key.line: 7,
47-
key.column: 7,
48-
key.is_dynamic: 1
49-
},
50-
{
51-
key.kind: source.lang.swift.decl.function.accessor.setter,
52-
key.usr: "s:18index_constructors11HorseObjectC4nameXevs",
53-
key.line: 7,
54-
key.column: 7,
55-
key.is_dynamic: 1
56-
}
57-
]
58-
},
5936
{
6037
key.kind: source.lang.swift.decl.function.method.instance,
6138
key.name: "flip()",

0 commit comments

Comments
 (0)