mirror of
https://github.com/mgechev/revive.git
synced 2025-11-23 22:04:49 +02:00
Fix/677 (#678)
This commit is contained in:
@@ -77,7 +77,7 @@ func (f *File) IsUntypedConst(expr ast.Expr) (defType string, ok bool) {
|
||||
// Re-evaluate expr outside its context to see if it's untyped.
|
||||
// (An expr evaluated within, for example, an assignment context will get the type of the LHS.)
|
||||
exprStr := f.Render(expr)
|
||||
tv, err := types.Eval(f.Pkg.fset, f.Pkg.TypesPkg, expr.Pos(), exprStr)
|
||||
tv, err := types.Eval(f.Pkg.fset, f.Pkg.TypesPkg(), expr.Pos(), exprStr)
|
||||
if err != nil {
|
||||
return "", false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user