# AnyObject subscript gone in 5.3?

**URL:** <https://forums.swift.org/t/anyobject-subscript-gone-in-5-3/38105>\
**Category:** Using Swift\
**Created:** [July 2, 2020, 7:47am UTC](https://forums.swift.org/t/anyobject-subscript-gone-in-5-3/38105 "2020-07-02T07:47:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandro\_Martinez](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/alejandro_martinez/32/821_2.png) [@Alejandro\_Martinez](https://forums.swift.org/u/Alejandro_Martinez)\
**Post date:** [July 2, 2020, 7:47am UTC](https://forums.swift.org/t/anyobject-subscript-gone-in-5-3/38105/1 "2020-07-02T07:47:11Z")

</div>

On Xcode 11 I had code in tests that looks like:

```swift
internal func fixtureWithName(_ name: String, ofType: String) throws -> Data
internal func fixtureWithName(_ name: String, ofType type: String) throws -> String
internal func fixtureWithName(_ name: String) throws -> AnyObject

```

and used like

```swift
let JSON = try? fixtureWithName("...")["body"]

```

Now in Xcode 12 I get an error in the usage line:

```swift
Ambiguous use of 'subscript(_:)'

```

I can change the code to workaround that but I wonder what has change between versions. Could somebody point me to a proposal that changed this behaviour? Cheers.
