Generator uses proper type owner UUID during interface conversion

This commit is contained in:
Sasha Koshka 2024-02-28 12:30:38 -05:00
parent 802a492be1
commit ddf1b57799
2 changed files with 5 additions and 4 deletions

View File

@ -124,7 +124,7 @@ func (this *generator) generateAssignmentToDestination ( // TODO: add -Val suffi
destTypeBase, irDestLoc,
irDestType, name)
key := entity.Key {
Unit: sourceType.Unit(),
Unit: sourceType.Type.Unit(),
Name: sourceType.Name,
Method: name,
}

View File

@ -44,11 +44,12 @@ func (this *generator) generateMethodCallVal (call *entity.MethodCall) (llvm.Val
// check for methods on named type
if sourceType, ok := call.Source.Type().(*entity.TypeNamed); ok {
method, err := this.method(entity.Key {
Unit: sourceType.Unit(),
methodKey := entity.Key {
Unit: sourceType.Type.Unit(),
Name: sourceType.Name,
Method: call.Name,
})
}
method, err := this.method(methodKey)
if _, notFound := err.(errNotFound); !notFound {
source, err := this.generateExpressionLoc(call.Source)
if err != nil { return nil, err }