File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -5100,7 +5100,7 @@ void Parser::recordLocalType(TypeDecl *TD) {
5100
5100
return ;
5101
5101
5102
5102
if (!InInactiveClauseEnvironment)
5103
- SF.LocalTypeDecls .insert (TD);
5103
+ SF.getOutermostParentSourceFile ()-> LocalTypeDecls .insert (TD);
5104
5104
}
5105
5105
5106
5106
// / Set the original declaration in `@differentiable` attributes.
Original file line number Diff line number Diff line change @@ -234,11 +234,17 @@ func testStringifyWithThrows() throws {
234
234
235
235
// CHECK-DIAGS: @__swiftmacro_9MacroUser23testStringifyWithThrowsyyKF9stringifyfMf1_.swift:1:2: error: call can throw but is not marked with 'try'
236
236
#endif
237
-
237
+
238
238
// The macro adds the 'try' for us.
239
239
_ = #stringifyAndTry ( maybeThrowing ( ) )
240
240
}
241
241
242
+ func testStringifyWithLocalType( ) throws {
243
+ _ = #stringify({
244
+ struct QuailError: Error {}
245
+ throw QuailError()
246
+ })
247
+ }
242
248
243
249
@freestanding(expression) macro addBlocker<T>(_ value: T) -> T = #externalMacro(module: " MacroDefinition" , type: " AddBlocker " )
244
250
@@ -495,7 +501,7 @@ func testHasEqualsSelf(
495
501
_ = ( y == true ) // expected-error{{referencing operator function '=='}}
496
502
_ = ( z == true ) // expected-error{{referencing operator function '=='}}
497
503
_ = ( w == true ) // expected-error{{referencing operator function '=='}}
498
- #endif
504
+ #endif
499
505
500
506
// These should be found through the protocol.
501
507
_ = ( xP == true )
You can’t perform that action at this time.
0 commit comments