Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-9508] Compiler Crash with typealias in constrained extension #51961

Closed
nsalmoria opened this issue Dec 13, 2018 · 8 comments
Closed

[SR-9508] Compiler Crash with typealias in constrained extension #51961

nsalmoria opened this issue Dec 13, 2018 · 8 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software regression swift 5.0

Comments

@nsalmoria
Copy link
Contributor

Previous ID SR-9508
Radar None
Original Reporter @nsalmoria
Type Bug
Status Resolved
Resolution Done
Environment

Xcode 10.1, Development Snapshot 2018-12-10

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 5.0Regression, CompilerCrash
Assignee @slavapestov
Priority Medium

md5: 4bf7516c124c9b0d78534dc5a869c864

Issue Description:

このコードは、Xcodeの10.1と、デフォルトのツールチェーンと罰金をコンパイルしますが、開発スナップショット2018年12月10日でクラッシュ。

プロトコルP {
    associatedtype A
}

構造体S1P {
    typealias A =のInt
}

構造体S2 <GP> P {
    A = GA typealias
}

構造体S3 <GP> {
}

拡張S3ここでG == S2 <S1> {
    B = GA typealias
}

クラッシュログがあります

アサーションが失敗しました:(ownerNominal == baseTy-> getAnyNominal())、関数getContextSubstitutionsファイル/ユーザ/ buildnode /ジェンキンス/ワークスペース/ OSS-swift- パッケージ -osx / SWIFT / libに/ AST / Type.cppライン3147スタックダンプ0プログラムの引数:/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2018-12-10-a.xctoolchain/usr/bin/swift -frontend -c /ユーザ/ nicolasalmoria /ドキュメント/ BugReportCompilerCrash4 / VeniceConnection /メイン。迅速-emitモジュールパス/Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii/Build/Intermediates.noindex/ownerNominal.build/Release/ownerNominal.build/Objects-normal/x86_64/ownerNominal.swiftmodule  - EMITモジュール-docのパス/Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii/Build/Intermediates.noindex/ownerNominal.build/Release/ownerNominal.build/Objects-normal/x86_64/ownerNominal.swiftdoc  - 直列化・診断・パス/ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/中間体。NOINDEX / ownerNominal.build /リリース/ ownerNominal.build /オブジェクト - ノーマル/ x86_64版/ ownerNominal-master.dia -emit-にObjC-ヘッダパス/ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/ Intermediates.noindex / ownerNominal.build /リリース/ ownerNominal.build /オブジェクト - ノーマル/ x86_64版/ ownerNominal-Swift.h -emit依存関係パス/ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/ Intermediates.noindex / ownerNominal.build /リリース/ ownerNominal.build /オブジェクト - ノーマル/ x86_64版/ ownerNominal-master.d -targetはx86_64-りんごmacosx10.13 -enable-にObjC-相互運用-sdk /Applications/Xcode.app/Contents /Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14SDK -I /ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/製品/リリース-F /ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/製品/リリース - グラム-moduleキャッシュパス/Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-バージョン4.2 -O -serialize-デバッグオプション-XCCだけ-I /ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/DerivedData/VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii/Build/Intermediates.noindex/ownerNominal.build/Release/ownerNominal.build/swift-overrides.hmap -XCCだけ-iquote -XCC /ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /Build/Intermediates.noindex/ownerNominal.build/Release/ownerNominal.build/ownerNominal-generated-filesHMAP -XCCだけ-I /ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/ Intermediates.noindex / ownerNominal.build /リリース/ ownerNominal.build / ownerNominal-自身のターゲット-headers.hmap -XCCだけ - I /ユーザー/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/ Intermediates.noindex / ownerNominal.build /リリース/ ownerNominal.build / ownerNominal-すべてのターゲットheaders.hmap -XCCだけ-iquote -XCC /ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/ Intermediates.noindex / ownerNominal.build /リリース/ ownerNominal.build / ownerNominal-プロジェクトのヘッダーHMAP -XCCだけ-I /ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/製品/リリース/含-XCCだけ-I /ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/ Intermediates.noindex / ownerNominal.build /リリース/ ownerNominal.build / DerivedSources / x86_64の-XCCだけ-I /ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/ Intermediates.noindex / ownerNominal.build /リリース/ ownerNominal.build / DerivedSources -XCCだけ-workingディレクトリ/ユーザ/ nicolasalmoria /ドキュメント/ BugReportCompilerCrash4 -moduleownerNominal -num-スレッド4 -o /ユーザ/ nicolasalmoria /ライブラリ/開発/ Xcodeの/ DerivedData / VeniceConnection-fsfvwpvpcldnbxbtfjftvgmbcbii /ビルド/ Intermediates.noindex / ownerNominal.build /リリース/ ownerNominalビルド/オブジェクト-ノーマル/ x86_64版/ main.o
1.(/Users/nicolasalmoria/Documents/BugReportCompilerCrash4/VeniceConnection/main.swift:16:1S3 <G>チェック拡張ながらチェックしながら2B」(/Users/nicolasalmoria/Documents/BugReportCompilerCrash4/VeniceConnection/main.swift:17:53.検証中'B'(/Users/nicolasalmoria/Documents/BugReportCompilerCrash4/VeniceConnection/main.swift:17:54 /Users/nicolasalmoria/Documents/BugReportCompilerCrash4/VeniceConnection/main.swift:17:19 -行:1721]でタイプGAを解決中RangeText = "G."
0迅速0x000000010e5b4c78 LLVM :: SYS ::のprintStackTraceLLVM :: raw_ostream&)+ 40
1つの迅速0x000000010e5b3ef5 LLVM :: SYS :: RunSignalHandlers()+ 85
2 SWIFT 0x000000010e5b5282 SignalHandlerINT)+ 258
3 libsystem_platform.dylib 0x00007fff5b7aeb3d _sigtramp + 29
4 libsystem_malloc.dylib 0x00007fff5b773d71 tiny_malloc_should_clear + 273
5 libsystem_c.dylib 0x00007fff5b66c1c9アボート+ 127
6 libsystem_c.dylib 0x00007fff5b634868 basename_r + 0
7迅速0x000000010bd82a63迅速:: TypeBase :: getContextSubstitutionsSWIFT :: DeclContext のconst *、迅速:: GenericEnvironment *)+ 1619
SWIFT 0x000000010bd7c00f 8迅速:: TypeBase :: getContextSubstitutionMapSWIFT :: ModuleDecl *、迅速:: DeclContext CONST *、迅速:: GenericEnvironment *)+ 63
9迅速0x000000010ba2cf88迅速::型チェッカー:: substMemberTypeWithBaseSWIFT :: ModuleDecl *、迅速:: TypeDecl *、迅速::タイプブール値)+ 936
10迅速0x000000010ba2c355迅速:: TypeResolution :: resolveDependentMemberTypeSWIFT ::タイプ、迅速:: DeclContext *、迅速:: SourceRange、迅速:: ComponentIdentTypeRepr *)のconst + 549スウィフト::タイプ解像度、LLVM ::配列リファレンス<迅速ComponentIdentTypeRepr :: *>、迅速::タイプ解像度オプション)+ 126911 0x000000010ba30035 resolveIdentTypeComponentスウィフト
12スイフト0x000000010ba2f78bの迅速::型チェッカー:: resolveIdentifierTypeSWIFT :: TypeResolution、迅速:: IdentTypeRepr *、SWIFT :: TypeResolutionOptions)+ 155
13 SWIFTの0x000000010ba30b5a(匿名名前空間):: :: TypeResolver resolveTypeスウィフト:: TypeRepr *、迅速::タイプ解像度オプション)+ 282
14 0x000000010ba2edd1 SWIFTスウィフト::タイプ:: resolveType解像度(スウィフト:: TypeRepr *、迅速::タイプ解像度オプション)+ 225
15スイフト0x000000010ba309b2の迅速::型チェッカー:: validateTypeSWIFT :: TypeLoc&、迅速:: TypeResolutionSWIFT :: TypeResolutionOptions)+ 98
16迅速0x000000010b9a7a37 validateTypealiasTypeSWIFT ::型チェッカー&、迅速:: TypeAliasDecl *)+ 167
17 SWIFTの0x000000010b9a5d2eの迅速::型チェッカー:: validateDeclSWIFT :: ValueDecl *)+ 2510
18 SWIFTの0x000000010b9a24d9(匿名名前空間):: DeclChecker ::訪問(SWIFT ::供述*)+ 1545
19 SWIFTの0x000000010b9b0a5b(匿名名前空間):: DeclChecker :: visitExtensionDeclSWIFT :: ExtensionDecl *)+ 251
20 SWIFTの0x000000010b9a25d3(匿名名前空間):: DeclChecker ::訪問(SWIFT ::供述*)+ 1795
21 SWIFT SWIFT 0x000000010b9a1ec6 :: ::型チェッカーtypeCheckDeclSWIFT供述:: *)+ 38
22 SWIFT 0x000000010ba3b9c8迅速:: performTypeCheckingSWIFT :: SOURCEFILE&、迅速:: TopLevelContext&、迅速::option <迅速:: TypeCheckingFlags、符号なし整数 >、符号なし整数、符号なし整数、符号なし整数、符号なし整数、符号なし整数)+ 872
23 SWIFTの0x000000010b20e2acの迅速:: CompilerInstance :: parseAndTypeCheckMainFileUpToSWIFT :: SOURCEFILE :: ASTStage_t、迅速:: PersistentParserState&、迅速:: DelayedParsingCallbacks *、迅速::option <迅速:: TypeCheckingFlags、符号なし整数 >)+ 492
24 SWIFT 0x000000010b20cc23迅速:: CompilerInstance :: parseAndCheckTypesUpToSWIFT :: CompilerInstance :: ImplicitImports のconst&、迅速:: SOURCEFILE :: ASTStage_t)+ 435
25 SWIFT 0x000000010b20c2e8迅速:: CompilerInstance :: performSemaUpToSWIFT :: SOURCEFILE :: ASTStage_t)+ 616
26迅速0x000000010a9ea2c4 performCompileSWIFT :: CompilerInstance&、迅速:: CompilerInvocation&、LLVM ::配列リファレンス< CHAR  のconst *>、INT&、迅速:: FrontendObserver *、迅速:: UnifiedStatsReporter *)+ 1300
27迅速0x000000010a9e8d42迅速:: performFrontendLLVM ::配列リファレンス< CHAR  のconst *>、charのconst *、void *型、迅速:: FrontendObserver *)+ 2978
28 SWIFTの0x000000010a99ab1eのメイン+ 686
29 libdyld.dylib 0x00007fff5b5c3ed9開始+ 1
30 libdyld.dylibの0x000000000000003a開始+ 2762195298
エラー:中止トラップ6
@belkadan
Copy link
Contributor

I don't think this ever worked the way you wanted, so maybe it's a good thing it crashed.

let x: S3<S1>.B? = nil

@nsalmoria
Copy link
Contributor Author

I think you are showing a different bug with the let x: line. The code I showed should be valid, and it worked correctly with Swift 4.2.

Your example is invalid code that actually compiles with Swift 4.2: while the typealias is defined in a constrained extension, it is incorrectly visible globally. Is this already known or should I report it in a separate issue?

To crash with Swift 4.2 you need to make it slightly more convoluted:

protocol Q {
    associatedtype R
}

extension S3 where G: Q {
    typealias C = G.R
}

let y: S3<S1>.C = nil

This does indeed crash with Swift 4.2, but with Development Snapshot 2018-12-10 the assert is different from what I showed above, adding further evidence that this is a different bug:

checked decl cannot have error type
(var_decl range=[/Users/nicolasalmoria/Documents/BugReportCompilerCrash4/VeniceConnection/main.swift:31:5 - line:31:5] "y" type='<<error type>>' interface type='<<error type>>' access=internal let readImpl=stored immutable)
Stack dump:
0.  Program arguments: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2018-12-10-a.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/nicolasalmoria/Documents/BugReportCompilerCrash4/VeniceConnection/main.swift -emit-module-path /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/Objects-normal/x86_64/main~partial.swiftmodule -emit-module-doc-path /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/Objects-normal/x86_64/main~partial.swiftdoc -serialize-diagnostics-path /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/Objects-normal/x86_64/main.dia -emit-dependencies-path /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/Objects-normal/x86_64/main.d -emit-reference-dependencies-path /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/Objects-normal/x86_64/main.swiftdeps -target x86_64-apple-macosx10.13 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Products/Debug -F /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Products/Debug -enable-testing -g -module-cache-path /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4.2 -enforce-exclusivity=checked -Onone -D DEBUG -serialize-debugging-options -Xcc -I/Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/SR-9508-generated-files.hmap -Xcc -I/Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/SR-9508-own-target-headers.hmap -Xcc -I/Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/SR-9508-all-target-headers.hmap -Xcc -iquote -Xcc /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/SR-9508-project-headers.hmap -Xcc -I/Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Products/Debug/include -Xcc -I/Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/DerivedSources/x86_64 -Xcc -I/Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -working-directory/Users/nicolasalmoria/Documents/BugReportCompilerCrash4 -module-name SR_9508 -o /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Build/Intermediates.noindex/SR-9508.build/Debug/SR-9508.build/Objects-normal/x86_64/main.o -index-store-path /Users/nicolasalmoria/Library/Developer/Xcode/DerivedData/SR-9508-djsdvfrplcpmqyeevggkxowuhkvk/Index/DataStore -index-system-modules 
1.  While walking into decl declaration 0x7ffb0a8ad148 (at /Users/nicolasalmoria/Documents/BugReportCompilerCrash4/VeniceConnection/main.swift:31:1)
2.  While verifying VarDecl 'y' (at /Users/nicolasalmoria/Documents/BugReportCompilerCrash4/VeniceConnection/main.swift:31:5)
0  swift                    0x0000000107a03c78 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  swift                    0x0000000107a02ef5 llvm::sys::RunSignalHandlers() + 85
2  swift                    0x0000000107a04282 SignalHandler(int) + 258
3  libsystem_platform.dylib 0x00007fff5b7aeb3d _sigtramp + 29
4  libsystem_platform.dylib 0x000000010bc907c7 _sigtramp + 2957909159
5  libsystem_c.dylib        0x00007fff5b66c1c9 abort + 127
6  swift                    0x00000001050db8de (anonymous namespace)::Verifier::verifyChecked(swift::ValueDecl*) + 302
7  swift                    0x00000001050dbe36 (anonymous namespace)::Verifier::verifyChecked(swift::VarDecl*) + 1286
8  swift                    0x00000001050d3e48 (anonymous namespace)::Verifier::walkToDeclPost(swift::Decl*) + 3656
9  swift                    0x00000001050dd7ac (anonymous namespace)::Traversal::doIt(swift::Decl*) + 252
10 swift                    0x00000001050e16e0 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Pattern*) + 192
11 swift                    0x00000001050e1975 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Pattern*) + 853
12 swift                    0x00000001050e23ee swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Decl*) + 478
13 swift                    0x00000001050dd788 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 216
14 swift                    0x00000001050e05c8 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) + 472
15 swift                    0x00000001050e22fb swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Decl*) + 235
16 swift                    0x00000001050dd788 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 216
17 swift                    0x00000001050dd69b swift::Decl::walk(swift::ASTWalker&) + 27
18 swift                    0x000000010518f5aa swift::SourceFile::walk(swift::ASTWalker&) + 170
19 swift                    0x00000001050c9beb swift::verify(swift::SourceFile&) + 59
20 swift                    0x0000000104e8ab5f swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) + 1279
21 swift                    0x000000010465d2ac swift::CompilerInstance::parseAndTypeCheckMainFileUpTo(swift::SourceFile::ASTStage_t, swift::PersistentParserState&, swift::DelayedParsingCallbacks*, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>) + 492
22 swift                    0x000000010465bc23 swift::CompilerInstance::parseAndCheckTypesUpTo(swift::CompilerInstance::ImplicitImports const&, swift::SourceFile::ASTStage_t) + 435
23 swift                    0x000000010465b2e8 swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 616
24 swift                    0x0000000103e392c4 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 1300
25 swift                    0x0000000103e37d42 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2978
26 swift                    0x0000000103de9b1e main + 686
27 libdyld.dylib            0x00007fff5b5c3ed9 start + 1
error: Abort trap: 6

@belkadan
Copy link
Contributor

I just meant that it's a known issue that "typealiases in constrained extensions" don't really work, but you're right that "it works in contexts where it shouldn't" is different from "it doesn't work in contexts where it ought to".

cc @slavapestov, @DougGregor

@slavapestov
Copy link
Member

Huon added code a while ago to check constraints when accessing a type alias as a member, but perhaps there's still some bugs remaining. I'll take a look later.

@belkadan
Copy link
Contributor

belkadan commented Apr 2, 2019

Did this get fixed?

@slavapestov
Copy link
Member

I never got a chance to investigate, unfortunately. However the test case is no longer crashing. I'll add it to validation-tests and close this bug.

@slavapestov
Copy link
Member

(I also confirmed it was crashing in the 2018-12-08 snapshot but was fixed in 2019-02-28 on the 5.0 branch, so maybe we don't even need to add a regression test if it was a deliberate fix. But lets do it just to be sure)

@slavapestov
Copy link
Member

#23749

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software regression swift 5.0
Projects
None yet
Development

No branches or pull requests

4 participants