# Error "no method matching fieldindex"

**URL:** <https://discourse.julialang.org/t/error-no-method-matching-fieldindex/21468>\
**Category:** General Usage\
**Created:** [March 4, 2019, 4:24pm UTC](https://discourse.julialang.org/t/error-no-method-matching-fieldindex/21468 "2019-03-04T16:24:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [March 4, 2019, 4:24pm UTC](https://discourse.julialang.org/t/error-no-method-matching-fieldindex/21468/1 "2019-03-04T16:24:51Z")

</div>

Since Random123 was moved into a separate package (at least I think), some fairly involved code that ran fine before now throws an

```
ERROR: MethodError: no method matching fieldindex(::Type{Random123.Philox4x}, ::Symbol, ::Bool)

```

deep in code generation, in`early_inline_special_case()`. I wasn’t able to reproduce this with a MWE, it only happens when I run the full thing. And ideas how to diagnose/debug this? Should this happen at all?

---

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [March 4, 2019, 4:57pm UTC](https://discourse.julialang.org/t/error-no-method-matching-fieldindex/21468/2 "2019-03-04T16:57:02Z")

</div>

The error above seems to occur when I run the script in question the second time - taking a closer look, the original error may be this one (happens the first time I run the script):

```julia
Internal error: encountered unexpected error in runtime:
MethodError(f=typeof(Core.Compiler.fieldindex)(), args=(Random123.Philox4x{T, R} where R where T<:Union{UInt32, UInt64}, :ctr1, false), world=...)

```
