Skip to content

[SR-3938] compiler seg fault on generic instantiation across file boundaries #46523

@swift-ci

Description

@swift-ci
Previous ID SR-3938
Radar None
Original Reporter derammo (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

XCode Version 8.2.1 (8C1002)
Sorry, not sure what version of the compiler that product contains.

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash
Assignee None
Priority Medium

md5: 0f5262be002fddb1284da07beadd6173

duplicates:

  • SR-3707 Assertion failed: (hasInterfaceType() && "No interface type was set")

Issue Description:

The following seg faults the compiler. Note the two files are mutually dependent. It does not crash if both are combined into one source file.

//
//  main.swift
//  CrashMe
//
//  Created by Ammo Goettsch on 2/11/17.
//

import Foundation

class Generic<T> {
    var t: T
    init(t: T) {
        self.t = t
    }
}

class Example {
    typealias External = ExternalGenericInstantiation
    class Nested {
        
    }
}
//
//  Second.swift
//  CrashMe
//
//  Created by Ammo Goettsch on 2/11/17.
//

import Foundation

class ExternalGenericInstantiation: Generic<Example.Nested> {
    
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of software

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions