Skip to content

Commit

Permalink
Revert the AST copy as some users were relying on Check to be mutable (
Browse files Browse the repository at this point in the history
  • Loading branch information
TristonianJones committed Jan 25, 2024
1 parent 6b5d14c commit ba58735
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions checker/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ type checker struct {
// registry.
func Check(parsed *ast.AST, source common.Source, env *Env) (*ast.AST, *common.Errors) {
errs := common.NewErrors(source)
checked := ast.Copy(parsed)
typeMap := make(map[int64]*types.Type)
refMap := make(map[int64]*ast.ReferenceInfo)
c := checker{
AST: checked,
AST: ast.NewCheckedAST(parsed, typeMap, refMap),
ExprFactory: ast.NewExprFactory(),
env: env,
errors: &typeErrors{errs: errs},
Expand Down

0 comments on commit ba58735

Please sign in to comment.