File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
lib/SILOptimizer/Mandatory Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ bool PerformanceDiagnostics::visitFunctionEmbeddedSwift(
203203 SILFunction *function, LocWithParent *parentLoc) {
204204 // Don't check generic functions in embedded Swift, they're about to be
205205 // removed anyway.
206- if (function->getLoweredFunctionType ()-> getSubstGenericSignature ())
206+ if (function->isGeneric ())
207207 return false ;
208208
209209 if (!function->isDefinition ())
Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-emit-ir -verify %s -enable-experimental-feature Embedded -wmo
2+
3+ // REQUIRES: swift_in_compiler
4+ // REQUIRES: optimized_stdlib
5+ // REQUIRES: OS=macosx || OS=linux-gnu
6+
7+ public func foo( ) {
8+ let number = 42
9+ _ = withUnsafeBytes ( of: number) { bytes in
10+ bytes. map ( \. description) . joined ( separator: " . " ) // expected-error {{cannot use key path in embedded Swift}}
11+ }
12+ }
You can’t perform that action at this time.
0 commit comments