[swift-dev] ExistentialMetatypeType assertion failure on Linux

Luke Howard lukeh at padl.com
Tue Dec 29 23:04:07 CST 2015


I’m seeing an assertion failure when I try to compile the following on Linux:

	typealias TypeMetadataAccessor = @convention(c) () -> AnyClass?

The assertion failing is:

    assert(getASTContext().LangOpts.EnableObjCInterop ||
           *repr != MetatypeRepresentation::ObjC);

in ExistentialMetatypeType::ExistentialMetatypeType(). Commenting it out and the code compiles and works.

Can someone that understands the compiler suggest the correct fix?

— Luke


More information about the swift-dev mailing list