Files
swift-mirror/validation-test/compiler_crashers/0022-no-stacktrace.swift
Doug Gregor 2609a971b6 Perform name lookup for where clauses based on the generic parameter's context.
We were ending up looking in the parent context, but it didn't matter
because the parser pre-resolved the names of generic parameters. We
shouldn't be relying on the parser to do that.

Note that this regresses four compiler crashes, because they end up
looking back into their own generic parameter lists in unhealthy
ways. I'm going to temporarily burn some karma because of what this
enables...

Swift SVN r26688
2015-03-29 05:42:33 +00:00

10 lines
502 B
Swift

// RUN: not --crash %target-swift-frontend %s -parse -verify
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Based on the stack trace this bug is actually triggering a different code path
// compared to case #021. so these appears not to be dupes(!).
class A<T where T : A> { // expected-error {{reference to generic type 'A' requires arguments in <...>}} expected-note {{generic type 'A' declared here}}
}