You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
Jun 19, 2019
· 6 comments
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Assertion failed: (hasSelfMetadataParam() && "This method can only be called if the " "SILFunction has a self-metadata parameter"), function getSelfMetadataArgument, file /Volumes/Data/swift-public/swift/include/swift/SIL/SILFunction.h, line 955.
Stack dump:
0. Program arguments: /Volumes/Data/swift-public/build/ninja/swift-macosx-x86_64/bin/swift -frontend -c -primary-file - -target x86_64-apple-darwin18.6.0 -enable-objc-interop -sdk /Volumes/Data/Applications/Xcode10.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -color-diagnostics -module-name main -o /var/folders/_d/dmrgv26d3bs6lkrks9z825_w0000gn/T/--8a31fb.o
1. Swift version 5.0-dev (LLVM f0b886e419, Swift 96b7bb015e)
2. While silgen emitStoredPropertyInitialization SIL function "@$s4main4TestC12testPropertyAA0B7GenericCyACXDGvpfi".
for expression at [<stdin>:4:24 - line:4:42] RangeText="TestGeneric<Self>("
@belkadan Is it reasonable to ban this in `validateInitializerRef()`? Seems like a logical place for this check as its related to calling an initializer. There's already a check for CallExpr and we can build on that to detect if DynamicSelfType was passed as a generic argument to an initializer that's within a generic context.
No, it's not really about the initializer. You shouldn't be able to construct that type at all, and then you shouldn't be able to give that type to a property. (Slava would probably know better than me where the right place is.)
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Environment
MacOS 10.14.5
Apple Swift version 5.1 (swiftlang-1100.0.43.3 clang-1100.0.26.3)
Additional Detail from JIRA
md5: 155e0e962fe3a544887bad1ed0bc39b2
is duplicated by:
Issue Description:
Swift compiler crashes when using Self as a generic argument.
Sample code that produces crash
Stack dump
The text was updated successfully, but these errors were encountered: