Files
swift-mirror/validation-test/compiler_scale/var_decl_usage_checker.swift.gyb
Slava Pestov 0aece0c28e We need at least 7 samples for scale-test to produce a reliable result
One test was miscategorized as 'fast' because of this issue, but it
would occasionally fail. It turns out it always fails once you ask
for 7 points or more, so let's fix that and move it back to 'slow'.

Fixes rdar://162597936.
2025-10-15 16:13:25 -04:00

17 lines
292 B
Swift

// RUN: %scale-test --begin 1 --end 7 --step 1 --select VarDeclUsageCheckerExprVisits %s
// REQUIRES: asserts
protocol Proto {}
extension Proto {
var selfish: Proto { return self }
}
struct X: Proto {}
func test(_ x: X) -> Proto {
return x
%for i in range(0, N*5):
.selfish
%end
}