Skip to content

Commit 4bd9e25

Browse files
committed
More cleanup
1 parent d7516fa commit 4bd9e25

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/swift/AST/Module.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,9 @@ class ModuleDecl
482482
}
483483

484484
bool inSamePackage(ModuleDecl *other) {
485-
return !getPackageName().empty() && getPackageName() == other->getPackageName();
485+
return other != nullptr &&
486+
!getPackageName().empty() &&
487+
getPackageName() == other->getPackageName();
486488
}
487489

488490
/// Get the package associated with this module

test/IRGen/package_resilience.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ import resilient_struct
5656
import resilient_enum
5757

5858
// Concrete class with resilient stored property
59-
package final class ClassWithResilientProperty {
59+
package class ClassWithResilientProperty {
6060
package let p: Point
6161
package let s: Size
6262
package let color: Int32
@@ -65,7 +65,6 @@ package final class ClassWithResilientProperty {
6565
self.p = p
6666
self.s = s
6767
self.color = color
68-
6968
}
7069
}
7170

0 commit comments

Comments
 (0)