Files
swift-mirror/test/SILOptimizer/mandatory_inlining_circular.swift
Michael Gottesman b5f3a8a51a [mandatory-inlining] Turn on ownership verification on all swift tests for mandatory inlining.
The sil files have been left alone and mandatory inlining is still only being
applied to SIL without ownership. That is coming in a forthcoming commit.

rdar://31521023
2017-09-08 23:21:27 -07:00

11 lines
476 B
Swift

// RUN: %target-swift-frontend -enable-sil-ownership -sil-verify-all -emit-sil %s -o /dev/null -verify
@_transparent func waldo(_ x: Double) -> Double {
return fred(x); // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 1 {{while inlining here}}
}
@_transparent func fred(_ x: Double) -> Double {
return waldo(x); // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 1 {{while inlining here}}
}