swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.68k stars 10.38k forks source link

[SR-4768] Functions in generic context must have an interface type #47345

Open dabrahams opened 7 years ago

dabrahams commented 7 years ago
Previous ID SR-4768
Radar rdar://problem/31924830
Original Reporter @dabrahams
Type Bug
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, CompilerCrash | |Assignee | @DougGregor | |Priority | Medium | md5: c0c7443c12efdb9e1bd346372e397a49

Issue Description:

$ git fetch https://github.com/dabrahams/swift refs/bugs/functions-in-generic-context-must-have-an-interface-type:BUG && git checkout BUG

build the compiler with the following command

build-script  --skip-build-ios-device --skip-build-tvos-device --skip-build-compiler-rt --debug-swift-stdlib --skip-build-benchmarks --release --swift-stdlib-assertions --swift-stdlib-build-type=Debug

and get this assertion:

cd /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core && /usr/bin/python /Users/Shared/dabrahams/s/swift/utils/line-directive @/Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core/yYP58.txt -- /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./bin/swiftc -c -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -target x86_64-apple-macosx10.9 -resource-dir /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./lib/swift -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/../../../Developer/Library/Frameworks -Onone -g -D INTERNAL_CHECKS_ENABLED -I /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64 -module-cache-path /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./module-cache -no-link-objc-runtime -Xfrontend -enable-cow-existentials -nostdimport -parse-stdlib -module-name Swift -Xfrontend -group-info-path -Xfrontend /Users/Shared/dabrahams/s/swift/stdlib/public/core/GroupInfo.json -Xfrontend -sil-serialize-all -swift-version 3 -warn-swift3-objc-inference -module-link-name swiftCore -force-single-frontend-invocation -Xcc -D__SWIFT_CURRENT_DYLIB=swiftCore -parse-as-library -o /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core/macosx/x86_64/Swift.o @/Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core/yYP58.txt
/Users/Shared/dabrahams/s/swift/stdlib/public/core/SetAlgebra.swift:59:18: warning: redeclaration of associated type 'Element' from protocol 'ExpressibleByArrayLiteral' is better expressed as a 'where' clause on the protocol
  associatedtype Element
  ~~~~~~~~~~~~~~~^~~~~~~

/Users/Shared/dabrahams/s/swift/stdlib/public/core/CompilerProtocols.swift:583:18: note: 'Element' declared here
  associatedtype Element
                 ^
Functions in generic context must have an interface type
(func_decl "_isScalar(_:)" interface type='<<error type>>' access=internal type
  (parameter_list
    (parameter "self" type='Self.Type' interface type='Self.Type'))
  (parameter_list
    (parameter "x" type='<<error type>>' interface type='<<error type>>'))
  (result
    (type_ident
      (component id='Bool' bind=Swift.(file).Bool@/Users/Shared/dabrahams/s/swift/stdlib/public/core/Bool.swift:63:15))))
0  swift                    0x000000010519a848 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  swift                    0x000000010519aef6 SignalHandler(int) + 454
2  libsystem_platform.dylib 0x00007fffc9626b3a _sigtramp + 26
3  libsystem_platform.dylib 0x00007f9129c10860 _sigtramp + 1616813376
4  libsystem_c.dylib        0x00007fffc94ab420 abort + 129
5  swift                    0x0000000102da96fd (anonymous namespace)::Verifier::verifyChecked(swift::AbstractFunctionDecl*) + 877
6  swift                    0x0000000102da04b7 (anonymous namespace)::Verifier::walkToDeclPost(swift::Decl*) + 4679
7  swift                    0x0000000102da9fdf (anonymous namespace)::Traversal::doIt(swift::Decl*) + 319
8  swift                    0x0000000102db0844 (anonymous namespace)::Traversal::visitNominalTypeDecl(swift::NominalTypeDecl*) + 900
9  swift                    0x0000000102da9fff (anonymous namespace)::Traversal::doIt(swift::Decl*) + 351
10 swift                    0x0000000102da9e8b swift::Decl::walk(swift::ASTWalker&) + 27
11 swift                    0x0000000102e3360a swift::SourceFile::walk(swift::ASTWalker&) + 170
12 swift                    0x0000000102d9923b swift::verify(swift::SourceFile&) + 59
13 swift                    0x0000000102d1d03f swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 2079
14 swift                    0x0000000102889fb9 swift::CompilerInstance::performSema() + 3881
15 swift                    0x0000000101df5b67 performCompile(std::__1::unique_ptr<swift::CompilerInstance, std::__1::default_delete<swift::CompilerInstance> >&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 2279
16 swift                    0x0000000101df41b4 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3204
17 swift                    0x0000000101db0960 main + 3312
18 libdyld.dylib            0x00007fffc9417235 start + 1
19 libdyld.dylib            0x0000000000000029 start + 918457845
Stack dump:
0.  Program arguments: /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/bin/swift -frontend -c -filelist /var/folders/50/2x4x2k5s4398_5ybczcb7v000000gn/T/sources-7b6b43 -disable-objc-attr-requires-foundation-module -target x86_64-apple-macosx10.9 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64 -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/../../../Developer/Library/Frameworks -g -module-cache-path /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./module-cache -module-link-name swiftCore -nostdimport -parse-stdlib -resource-dir /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./lib/swift -warn-swift3-objc-inference -swift-version 3 -D INTERNAL_CHECKS_ENABLED -enable-cow-existentials -group-info-path /Users/Shared/dabrahams/s/swift/stdlib/public/core/GroupInfo.json -sil-serialize-all -Xcc -D__SWIFT_CURRENT_DYLIB=swiftCore -Onone -parse-as-library -module-name Swift -o /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core/macosx/x86_64/Swift.o 
1.  While walking into decl '_UTFEncoding' at /Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:18:10
2.  While verifying FuncDecl '_isScalar' at /Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:21:3
3.  While verifying AbstractFunctionDecl '_isScalar' at /Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:21:3
<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)

Other hashes

clang                              e6d55005e6 Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
cmark                              d875488 Merge pull request #&#8203;4 from llvm-beanz/generate-cmark-exports
compiler-rt                        3acb58590 Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
llbuild                            7853943 Merge pull request #&#8203;143 from neonichu/better-diagnostics-for-dependency-cycles
lldb                               6deeb29d5 Merge branch 'swift-4.0-branch' into stable
llvm                               8758fc3e9cc Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
ninja                              586bb6d Merge pull request #&#8203;1267 from atetubou/clparser_perftest
swift                              9d38e4b3cc Move rest of UnicodeDecoders into stdlib.
swift-corelibs-foundation          53a8f2bb Drop NS prefix from some files to match the class names (#971)
swift-corelibs-libdispatch         14d3d90 Merge pull request #&#8203;242 from compnerd/sizeof
swift-corelibs-xctest              2e0aedc Merge pull request #&#8203;189 from tkremenek/force-tests-swift-ver-3
swift-integration-tests            641971a Merge pull request #&#8203;21 from apple/revert-20-revert-19-revert-6a20dc2
swift-xcode-playground-support     05737c4 Merge pull request #&#8203;14 from tkremenek/update-swift-4
swiftpm                            09a6bf19 Merge pull request #&#8203;1139 from aciidb0mb3r/disable-chflags
dabrahams commented 7 years ago

@swift-ci create

dabrahams commented 7 years ago

Attempted workaround by qualifying Self.CodeUnit where the assertion is pointing just yields

/Users/Shared/dabrahams/s/swift/stdlib/public/core/SetAlgebra.swift:59:18: warning: redeclaration of associated type 'Element' from protocol 'ExpressibleByArrayLiteral' is better expressed as a 'where' clause on the protocol
  associatedtype Element
  ~~~~~~~~~~~~~~~^~~~~~~

/Users/Shared/dabrahams/s/swift/stdlib/public/core/CompilerProtocols.swift:583:18: note: 'Element' declared here
  associatedtype Element
                 ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:12:1: error: type '_Unicode.UTF8' (aka 'UTF8') does not conform to protocol '_UTFEncoding'
extension _Unicode.UTF8 : _UTFEncoding {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:19:24: note: candidate has non-matching type '(UTF8.CodeUnit) -> Bool' (aka '(UInt8) -> Bool')
  internal static func _isScalar(_ x: CodeUnit) -> Bool {
                       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:21:15: note: protocol requires function '_isScalar' with type '(_Unicode.UTF8.CodeUnit) -> Bool'; do you want to add a stub?
  static func _isScalar(_ x: Self.CodeUnit) -> Bool
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:88:1: error: type 'UTF8.ReverseParser' does not conform to protocol '_UTFParser'
extension UTF8.ReverseParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:84:16: note: candidate has non-matching type 'UTF8.ReverseParser._Buffer' (aka '_UIntBuffer<UInt32, UInt8>') [with _UInt32 = UInt32]
    public var _buffer: _Buffer
               ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:153:15: note: candidate has non-matching type '(UInt8) -> UTF8.EncodedScalar' (aka '(UInt8) -> _UIntBuffer<UInt32, UInt8>') [with _UInt32 = UInt32]
  public func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar {
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:88:1: error: type 'UTF8.ReverseParser' does not conform to protocol 'UnicodeParser'
extension UTF8.ReverseParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:89:20: note: possibly intended match 'UTF8.ReverseParser.Encoding' (aka 'UTF8') does not conform to '_UnicodeEncoding'
  public typealias Encoding = _Unicode.UTF8
                   ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:31:7: note: protocol requires property '_buffer' with type '_UIntBuffer<UInt32, <<error type>>.CodeUnit>'; do you want to add a stub?
  var _buffer: Encoding.EncodedScalar { get set }
      ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:32:8: note: protocol requires function '_bufferedScalar(bitCount:)' with type '(UInt8) -> <<error type>>.EncodedScalar'; do you want to add a stub?
  func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar
       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UnicodeParser.swift:30:18: note: protocol requires nested type 'Encoding'; do you want to add it?
  associatedtype Encoding : _UnicodeEncoding
                 ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:161:1: error: type '_Unicode.UTF8.ForwardParser' (aka 'UTF8.ForwardParser') does not conform to protocol '_UTFParser'
extension _Unicode.UTF8.ForwardParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:78:16: note: candidate has non-matching type 'UTF8.ForwardParser._Buffer' (aka '_UIntBuffer<UInt32, UInt8>') [with _UInt32 = UInt32]
    public var _buffer: _Buffer
               ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:220:15: note: candidate has non-matching type '(UInt8) -> UTF8.EncodedScalar' (aka '(UInt8) -> _UIntBuffer<UInt32, UInt8>') [with _UInt32 = UInt32]
  public func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar {
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:161:1: error: type '_Unicode.UTF8.ForwardParser' (aka 'UTF8.ForwardParser') does not conform to protocol 'UnicodeParser'
extension _Unicode.UTF8.ForwardParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:162:20: note: possibly intended match 'UTF8.ForwardParser.Encoding' (aka 'UTF8') does not conform to '_UnicodeEncoding'
  public typealias Encoding = _Unicode.UTF8
                   ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:31:7: note: protocol requires property '_buffer' with type '_UIntBuffer<UInt32, <<error type>>.CodeUnit>'; do you want to add a stub?
  var _buffer: Encoding.EncodedScalar { get set }
      ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:32:8: note: protocol requires function '_bufferedScalar(bitCount:)' with type '(UInt8) -> <<error type>>.EncodedScalar'; do you want to add a stub?
  func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar
       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UnicodeParser.swift:30:18: note: protocol requires nested type 'Encoding'; do you want to add it?
  associatedtype Encoding : _UnicodeEncoding
                 ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:12:1: error: type '_Unicode.UTF16' (aka 'UTF16') does not conform to protocol '_UTFEncoding'
extension _Unicode.UTF16 : _UTFEncoding {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:19:24: note: candidate has non-matching type '(UTF16.CodeUnit) -> Bool' (aka '(UInt16) -> Bool')
  internal static func _isScalar(_ x: CodeUnit) -> Bool  {
                       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:21:15: note: protocol requires function '_isScalar' with type '(_Unicode.UTF16.CodeUnit) -> Bool'; do you want to add a stub?
  static func _isScalar(_ x: Self.CodeUnit) -> Bool
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:58:1: error: type 'UTF16.ReverseParser' does not conform to protocol '_UTFParser'
extension UTF16.ReverseParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:54:16: note: candidate has non-matching type 'UTF16.ReverseParser._Buffer' (aka '_UIntBuffer<UInt32, UInt16>') [with _UInt32 = UInt32]
    public var _buffer: _Buffer
               ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:70:15: note: candidate has non-matching type '(UInt8) -> UTF16.EncodedScalar' (aka '(UInt8) -> _UIntBuffer<UInt32, UInt16>') [with _UInt32 = UInt32]
  public func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar {
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:58:1: error: type 'UTF16.ReverseParser' does not conform to protocol 'UnicodeParser'
extension UTF16.ReverseParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:59:20: note: possibly intended match 'UTF16.ReverseParser.Encoding' (aka 'UTF16') does not conform to '_UnicodeEncoding'
  public typealias Encoding = _Unicode.UTF16
                   ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:31:7: note: protocol requires property '_buffer' with type '_UIntBuffer<UInt32, <<error type>>.CodeUnit>'; do you want to add a stub?
  var _buffer: Encoding.EncodedScalar { get set }
      ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:32:8: note: protocol requires function '_bufferedScalar(bitCount:)' with type '(UInt8) -> <<error type>>.EncodedScalar'; do you want to add a stub?
  func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar
       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UnicodeParser.swift:30:18: note: protocol requires nested type 'Encoding'; do you want to add it?
  associatedtype Encoding : _UnicodeEncoding
                 ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:79:1: error: type '_Unicode.UTF16.ForwardParser' (aka 'UTF16.ForwardParser') does not conform to protocol '_UTFParser'
extension _Unicode.UTF16.ForwardParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:48:16: note: candidate has non-matching type 'UTF16.ForwardParser._Buffer' (aka '_UIntBuffer<UInt32, UInt16>') [with _UInt32 = UInt32]
    public var _buffer: _Buffer
               ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:91:15: note: candidate has non-matching type '(UInt8) -> UTF16.EncodedScalar' (aka '(UInt8) -> _UIntBuffer<UInt32, UInt16>') [with _UInt32 = UInt32]
  public func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar {
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:79:1: error: type '_Unicode.UTF16.ForwardParser' (aka 'UTF16.ForwardParser') does not conform to protocol 'UnicodeParser'
extension _Unicode.UTF16.ForwardParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:80:20: note: possibly intended match 'UTF16.ForwardParser.Encoding' (aka 'UTF16') does not conform to '_UnicodeEncoding'
  public typealias Encoding = _Unicode.UTF16
                   ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:31:7: note: protocol requires property '_buffer' with type '_UIntBuffer<UInt32, <<error type>>.CodeUnit>'; do you want to add a stub?
  var _buffer: Encoding.EncodedScalar { get set }
      ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:32:8: note: protocol requires function '_bufferedScalar(bitCount:)' with type '(UInt8) -> <<error type>>.EncodedScalar'; do you want to add a stub?
  func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar
       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UnicodeParser.swift:30:18: note: protocol requires nested type 'Encoding'; do you want to add it?
  associatedtype Encoding : _UnicodeEncoding
                 ^
[3/153] Compiling /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core/macosx/x86_64/Swift.o
FAILED: stdlib/public/core/macosx/x86_64/Swift.o 
cd /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core && /usr/bin/python /Users/Shared/dabrahams/s/swift/utils/line-directive @/Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core/yYP58.txt -- /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./bin/swiftc -c -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -target x86_64-apple-macosx10.9 -resource-dir /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./lib/swift -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/../../../Developer/Library/Frameworks -Onone -g -D INTERNAL_CHECKS_ENABLED -I /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64 -module-cache-path /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./module-cache -no-link-objc-runtime -Xfrontend -enable-cow-existentials -nostdimport -parse-stdlib -module-name Swift -Xfrontend -group-info-path -Xfrontend /Users/Shared/dabrahams/s/swift/stdlib/public/core/GroupInfo.json -Xfrontend -sil-serialize-all -swift-version 3 -warn-swift3-objc-inference -module-link-name swiftCore -force-single-frontend-invocation -Xcc -D__SWIFT_CURRENT_DYLIB=swiftCore -parse-as-library -o /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core/macosx/x86_64/Swift.o @/Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core/yYP58.txt
/Users/Shared/dabrahams/s/swift/stdlib/public/core/SetAlgebra.swift:59:18: warning: redeclaration of associated type 'Element' from protocol 'ExpressibleByArrayLiteral' is better expressed as a 'where' clause on the protocol
  associatedtype Element
  ~~~~~~~~~~~~~~~^~~~~~~

/Users/Shared/dabrahams/s/swift/stdlib/public/core/CompilerProtocols.swift:583:18: note: 'Element' declared here
  associatedtype Element
                 ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:12:1: error: type '_Unicode.UTF8' (aka 'UTF8') does not conform to protocol '_UTFEncoding'
extension _Unicode.UTF8 : _UTFEncoding {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:19:24: note: candidate has non-matching type '(UTF8.CodeUnit) -> Bool' (aka '(UInt8) -> Bool')
  internal static func _isScalar(_ x: CodeUnit) -> Bool {
                       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:21:15: note: protocol requires function '_isScalar' with type '(_Unicode.UTF8.CodeUnit) -> Bool'; do you want to add a stub?
  static func _isScalar(_ x: Self.CodeUnit) -> Bool
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:88:1: error: type 'UTF8.ReverseParser' does not conform to protocol '_UTFParser'
extension UTF8.ReverseParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:84:16: note: candidate has non-matching type 'UTF8.ReverseParser._Buffer' (aka '_UIntBuffer<UInt32, UInt8>') [with _UInt32 = UInt32]
    public var _buffer: _Buffer
               ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:153:15: note: candidate has non-matching type '(UInt8) -> UTF8.EncodedScalar' (aka '(UInt8) -> _UIntBuffer<UInt32, UInt8>') [with _UInt32 = UInt32]
  public func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar {
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:88:1: error: type 'UTF8.ReverseParser' does not conform to protocol 'UnicodeParser'
extension UTF8.ReverseParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:89:20: note: possibly intended match 'UTF8.ReverseParser.Encoding' (aka 'UTF8') does not conform to '_UnicodeEncoding'
  public typealias Encoding = _Unicode.UTF8
                   ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:31:7: note: protocol requires property '_buffer' with type '_UIntBuffer<UInt32, <<error type>>.CodeUnit>'; do you want to add a stub?
  var _buffer: Encoding.EncodedScalar { get set }
      ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:32:8: note: protocol requires function '_bufferedScalar(bitCount:)' with type '(UInt8) -> <<error type>>.EncodedScalar'; do you want to add a stub?
  func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar
       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UnicodeParser.swift:30:18: note: protocol requires nested type 'Encoding'; do you want to add it?
  associatedtype Encoding : _UnicodeEncoding
                 ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:161:1: error: type '_Unicode.UTF8.ForwardParser' (aka 'UTF8.ForwardParser') does not conform to protocol '_UTFParser'
extension _Unicode.UTF8.ForwardParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:78:16: note: candidate has non-matching type 'UTF8.ForwardParser._Buffer' (aka '_UIntBuffer<UInt32, UInt8>') [with _UInt32 = UInt32]
    public var _buffer: _Buffer
               ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:220:15: note: candidate has non-matching type '(UInt8) -> UTF8.EncodedScalar' (aka '(UInt8) -> _UIntBuffer<UInt32, UInt8>') [with _UInt32 = UInt32]
  public func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar {
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:161:1: error: type '_Unicode.UTF8.ForwardParser' (aka 'UTF8.ForwardParser') does not conform to protocol 'UnicodeParser'
extension _Unicode.UTF8.ForwardParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF8.swift:162:20: note: possibly intended match 'UTF8.ForwardParser.Encoding' (aka 'UTF8') does not conform to '_UnicodeEncoding'
  public typealias Encoding = _Unicode.UTF8
                   ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:31:7: note: protocol requires property '_buffer' with type '_UIntBuffer<UInt32, <<error type>>.CodeUnit>'; do you want to add a stub?
  var _buffer: Encoding.EncodedScalar { get set }
      ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:32:8: note: protocol requires function '_bufferedScalar(bitCount:)' with type '(UInt8) -> <<error type>>.EncodedScalar'; do you want to add a stub?
  func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar
       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UnicodeParser.swift:30:18: note: protocol requires nested type 'Encoding'; do you want to add it?
  associatedtype Encoding : _UnicodeEncoding
                 ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:12:1: error: type '_Unicode.UTF16' (aka 'UTF16') does not conform to protocol '_UTFEncoding'
extension _Unicode.UTF16 : _UTFEncoding {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:19:24: note: candidate has non-matching type '(UTF16.CodeUnit) -> Bool' (aka '(UInt16) -> Bool')
  internal static func _isScalar(_ x: CodeUnit) -> Bool  {
                       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:21:15: note: protocol requires function '_isScalar' with type '(_Unicode.UTF16.CodeUnit) -> Bool'; do you want to add a stub?
  static func _isScalar(_ x: Self.CodeUnit) -> Bool
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:58:1: error: type 'UTF16.ReverseParser' does not conform to protocol '_UTFParser'
extension UTF16.ReverseParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:54:16: note: candidate has non-matching type 'UTF16.ReverseParser._Buffer' (aka '_UIntBuffer<UInt32, UInt16>') [with _UInt32 = UInt32]
    public var _buffer: _Buffer
               ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:70:15: note: candidate has non-matching type '(UInt8) -> UTF16.EncodedScalar' (aka '(UInt8) -> _UIntBuffer<UInt32, UInt16>') [with _UInt32 = UInt32]
  public func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar {
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:58:1: error: type 'UTF16.ReverseParser' does not conform to protocol 'UnicodeParser'
extension UTF16.ReverseParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:59:20: note: possibly intended match 'UTF16.ReverseParser.Encoding' (aka 'UTF16') does not conform to '_UnicodeEncoding'
  public typealias Encoding = _Unicode.UTF16
                   ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:31:7: note: protocol requires property '_buffer' with type '_UIntBuffer<UInt32, <<error type>>.CodeUnit>'; do you want to add a stub?
  var _buffer: Encoding.EncodedScalar { get set }
      ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:32:8: note: protocol requires function '_bufferedScalar(bitCount:)' with type '(UInt8) -> <<error type>>.EncodedScalar'; do you want to add a stub?
  func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar
       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UnicodeParser.swift:30:18: note: protocol requires nested type 'Encoding'; do you want to add it?
  associatedtype Encoding : _UnicodeEncoding
                 ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:79:1: error: type '_Unicode.UTF16.ForwardParser' (aka 'UTF16.ForwardParser') does not conform to protocol '_UTFParser'
extension _Unicode.UTF16.ForwardParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:48:16: note: candidate has non-matching type 'UTF16.ForwardParser._Buffer' (aka '_UIntBuffer<UInt32, UInt16>') [with _UInt32 = UInt32]
    public var _buffer: _Buffer
               ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:91:15: note: candidate has non-matching type '(UInt8) -> UTF16.EncodedScalar' (aka '(UInt8) -> _UIntBuffer<UInt32, UInt16>') [with _UInt32 = UInt32]
  public func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar {
              ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:79:1: error: type '_Unicode.UTF16.ForwardParser' (aka 'UTF16.ForwardParser') does not conform to protocol 'UnicodeParser'
extension _Unicode.UTF16.ForwardParser : _UTFParser {
^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTF16.swift:80:20: note: possibly intended match 'UTF16.ForwardParser.Encoding' (aka 'UTF16') does not conform to '_UnicodeEncoding'
  public typealias Encoding = _Unicode.UTF16
                   ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:31:7: note: protocol requires property '_buffer' with type '_UIntBuffer<UInt32, <<error type>>.CodeUnit>'; do you want to add a stub?
  var _buffer: Encoding.EncodedScalar { get set }
      ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UTFEncoding.swift:32:8: note: protocol requires function '_bufferedScalar(bitCount:)' with type '(UInt8) -> <<error type>>.EncodedScalar'; do you want to add a stub?
  func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar
       ^
/Users/Shared/dabrahams/s/swift/stdlib/public/core/UnicodeParser.swift:30:18: note: protocol requires nested type 'Encoding'; do you want to add it?
  associatedtype Encoding : _UnicodeEncoding
                 ^
dabrahams commented 7 years ago

No longer a blocker.