Skip to content

Commit

Permalink
Merge pull request #217 from Eclalang/issue-#216-remove-debug-print
Browse files Browse the repository at this point in the history
replaced the debug print by an error
  • Loading branch information
tot0p authored Feb 24, 2024
2 parents cc1f7d5 + 7b960fd commit c41b681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions interpreter/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,10 @@ func RunSelectorExpr(expr parser.SelectorExpr, env *Env, Struct eclaType.Type) [
}
return []*Bus{NewMainBus(*result)}
default:
fmt.Printf("%T\n", expr.Sel)
env.ErrorHandle.HandleError(0, expr.StartPos(), "struct cannot have filed of type "+prev.GetType(), errorHandler.LevelFatal)
}
default:
fmt.Printf("%T\n", prev)
env.ErrorHandle.HandleError(0, expr.StartPos(), "type "+prev.GetType()+" has no fields", errorHandler.LevelFatal)
}
return []*Bus{NewNoneBus()}
}
Expand Down

0 comments on commit c41b681

Please sign in to comment.