mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
(This could occur, for instance, via a forward reference to a member defined in an extension to a generic type.) This problem has been popping up a lot lately, and was making some of the recent runtime work difficult. (rdar://problem/16481483) Swift SVN r15805
23 lines
500 B
Swift
23 lines
500 B
Swift
// RUN: %swift -primary-file %s %S/../../Inputs/forward_extension_reference.swift -target x86_64-apple-darwin10 -emit-ir -g -module-name fref
|
|
// RUN: %swift %S/../../Inputs/forward_extension_reference.swift -primary-file %s -target x86_64-apple-darwin10 -emit-ir -g -module-name fref
|
|
|
|
struct Foo<T> {
|
|
func foo(t: T) -> T {
|
|
return t
|
|
}
|
|
|
|
var _countAndFlags: UInt = 0
|
|
|
|
func gar() -> Int {
|
|
return count
|
|
}
|
|
}
|
|
|
|
func goo<T>(f: Foo<T>) {
|
|
var x = f.count
|
|
}
|
|
|
|
protocol Bar {
|
|
var count: Int {get set}
|
|
}
|