Skip to content

[SR-15757] [Windows] Cannot inherit from class 'InputStream' #3181

Open
@lxbndr

Description

@lxbndr
Previous ID SR-15757
Radar None
Original Reporter @lxbndr
Type Bug

Attachment: Download

Environment

Windows 10

compnerd.org Swift version 5.5.2-dev (LLVM d461fd52e58eca6, Swift e6979d24987b522)

Additional Detail from JIRA
Votes 0
Component/s Compiler, Foundation
Labels Bug
Assignee @compnerd
Priority Medium

md5: 349f7f16ee058b9b9b9d1effa84062f2

Issue Description:

It is impossible to subclass Foundation.InputStream on the 5.5 release branch (as well as on the main branch). The issue is reproducible with a few lines of code:

import Foundation
public class CustomStream: InputStream {}

Running compiler directly:

swiftc -parse-as-library -emit-library -sdk %SDKROOT% x06.swift -o x06.dll

Produces the following error:

x06.swift:3:14: error: cannot inherit from class 'InputStream' because it has overridable members that could not be loaded
public class CustomStream: InputStream {}
             ^

Additional observations

  • Rebuilding Foundation with -enable-library-evolution makes it possible to compile the sample code

  • Rebuilding Foundation with enabled testability also helps

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions