Files
swift-mirror/test/Misc/expression_too_complex.swift
Mark Lacey 1103e278c8 [Constraint solver] Tweak test based on using a bit more memory for -propagate-constraints.
This test is trying to confirm that memory usage is independent and that
follow-on expressions do not fail just because of the first failure, and
now we naturally fail on another expression because of the additional
memory used for -propagate-constraints.

Tweak the test to bump up the threshold and swap the order of
expressions so that the now-failing expression is first.
2017-04-15 20:18:09 -07:00

13 lines
444 B
Swift

// RUN: %target-typecheck-verify-swift -solver-memory-threshold 10000 -propagate-constraints
var z = 10 + 10 // expected-error{{expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions}}
// No errors should appear below as a result of the error above.
var x = [1, 2, 3, 4.5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ,19]
var y = 10
class C {}
var c = C()
var d = c