Returns true iff the type index is a resource defined in the current scope (not imported, not an outer-alias). Required for canon resource.new and resource.rep validation.
| 305 | /// scope (not imported, not an outer-alias). Required for canon |
| 306 | /// resource.new and resource.rep validation. |
| 307 | bool isLocalResource(uint32_t Idx) const noexcept { |
| 308 | const auto &Ctx = getCurrentContext(); |
| 309 | return Ctx.DefinedResources.find(Idx) != Ctx.DefinedResources.end(); |
| 310 | } |
| 311 | |
| 312 | const AST::Component::InstanceType * |
| 313 | getInstanceType(uint32_t Idx) const noexcept { |
no test coverage detected