Skip to content

Commit 285f854

Browse files
Fixing mistake in reflect when minimized
1 parent 53f7fbd commit 285f854

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/expressions.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,8 @@ func (fc *funcContext) translateConversion(expr ast.Expr, desiredType types.Type
11721172
// The following are extensions of the ABI equivalent type to add more methods.
11731173
// e.g. `type structType struct { abi.StructType }`.
11741174
case `interfaceType`, `mapType`, `ptrType`, `sliceType`, `structType`:
1175-
return fc.formatExpr("toKindTypeExt(%e)", call.Args[0]) // unsafe conversion
1175+
obj := fc.pkgCtx.Pkg.Scope().Lookup(`toKindTypeExt`)
1176+
return fc.formatExpr("%s(%e)", fc.objectName(obj), call.Args[0]) // unsafe conversion
11761177
}
11771178
}
11781179
return fc.translateExpr(expr)

0 commit comments

Comments
 (0)