Files
swift-mirror/test/multifile/inherited-inits.swift
Doug Gregor 8af269aca5 [Type checker] Make sure we have a generic signature when inheriting initializers.
Before adding implicit initializers synthesizes a new initializer, make sure that
we’ve validated the current class declaration to determine it’s generic signature.

Fixes rdar://problem/44235762.
2018-09-08 10:21:55 -07:00

13 lines
391 B
Swift

// RUN: %target-swift-frontend -typecheck -primary-file %s %S/Inputs/inherited-inits-other.swift -verify
// expected-no-diagnostics
// Test that we get the generic signature right (which is needed for the
// super.init to properly type-check) when it comes from another source
// file (rdar://problem/44235762).
class C: B<Int> {
override init(foo: Int) {
super.init(foo: foo)
}
}