mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When a function declaration has a body, its source range ends at the closing curly brace, so it includes the `throws(E)`. However, a protocol requirement doesn't have a body, and due to an oversight, getSourceRange() was never updated to include the extra tokens that appear after `throws` when the function declares a thrown error type. As a result, unqualified lookup would fail to find a generic parameter type, if that happened to be the thrown type. Fixes rdar://problem/143950572.
14 KiB
14 KiB