- auto sm = findStructMember(p,\r
- typeExpr(p, globalNamespace, globalCtx, *e._dot.expr), e._dot.identifier);\r
+ auto tiCaller = typeExpr(p, globalNamespace, globalCtx, *e._dot.expr);\r
+ if (!tiCaller.isStruct)\r
+ throw "Accessing member of non-struct";\r
+ auto s = findStruct(tiCaller.type.name, tiCaller.type.namespacePrefixes, globalCtx);\r
+ if (!s.has_value())\r
+ throw "Calling method on unknown struct";\r
+ auto sm = findStructMember(e._dot.identifier, s.value());\r