// RUN: %target-typecheck-verify-swift

struct Box<Representation, T> {
    let value: Representation
}
enum Repr {}
extension Repr {
    typealias RawEnum = ()
}
extension Box where Representation == Repr, T == Representation.RawEnum {
    init(rawEnumValue: Representation.RawEnum) {
        let _: ().Type = T.self
        fatalError()
    }
}

// RUN: %target-typecheck-verify-swift

struct Box<Representation, T> {
    let value: Representation
}
enum Repr {}
extension Repr {
    typealias RawEnum = ()
}
extension Box where Representation == Repr, T == Representation.RawEnum {
    init(rawEnumValue: Representation.RawEnum) {
        let _: Int.Type = T.self // expected-error {{cannot convert value of type '().Type' to specified type 'Int.Type'}}
        fatalError()
    }
}

--- 
+++ 
@@ -9,7 +9,7 @@
 }
 extension Box where Representation == Repr, T == Representation.RawEnum {
     init(rawEnumValue: Representation.RawEnum) {
-        let _: Int.Type = T.self // expected-error {{cannot convert value of type '().Type' to specified type 'Int.Type'}}
+        let _: ().Type = T.self
         fatalError()
     }
 }
[test] Stop a test relying on inconsistent formatting of an error message.

Fixes rdar://problem/42351773.
