[SR-2498] Foo.self is AnyObject
incorrectly claims it always returns true
#45103
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Environment
Apple Swift version 3.0 (swiftlang-800.0.43.6 clang-800.0.38)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: 2451fc1637b9025dc20c2e0c5fb85bd0
duplicates:
Issue Description:
With Xcode 8 beta 6, if I write
Foo.self is AnyObject
, whereFoo
is a generic parameter or is something known to be a value type (e.g. a struct), the compiler warns mewarning: 'is' test is always true
, but at runtime it evaluates tofalse
.Compiler output:
Runtime output:
The text was updated successfully, but these errors were encountered: