Skip to content

Commit

Permalink
Lint 223
Browse files Browse the repository at this point in the history
  • Loading branch information
julianhyde committed Feb 11, 2024
1 parent 42aa283 commit a9f0743
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/main/java/net/hydromatic/morel/compile/Compiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,12 @@ private void compileValDecl(Context cx, Core.ValDecl valDecl,
}
pairs.forEach((pat2, o2) -> {
// outBindings.accept(Binding.of(pat2, o2));
// outBindings.accept(Binding.of(pat2, exp.accept(Uniquifier.create(typeSystem, typeSystem.nameGenerator)), o2));
outBindings.accept(Binding.of(pat2, exp, o2));
// outBindings.accept(
// Binding.of(pat2,
// exp.accept(
// Uniquifier.create(typeSystem, typeSystem.nameGenerator)),
// o2));
outBindings.accept(Binding.of(pat2, exp, o2));
if (pat2 != skipPat) {
int stringDepth = Prop.STRING_DEPTH.intValue(session.map);
int lineWidth = Prop.LINE_WIDTH.intValue(session.map);
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/net/hydromatic/morel/compile/Uniquifier.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* Licensed to Julian Hyde under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Julian Hyde licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package net.hydromatic.morel.compile;

import net.hydromatic.morel.ast.Core;
Expand Down Expand Up @@ -49,3 +67,5 @@ protected EnvShuttle push(Environment env) {
return core.id(id.idPat.accept(this));
}
}

// End Uniquifier.java
4 changes: 2 additions & 2 deletions src/main/java/net/hydromatic/morel/type/Binding.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
*/
package net.hydromatic.morel.type;

import org.apache.calcite.util.Util;

import net.hydromatic.morel.ast.Core;
import net.hydromatic.morel.eval.Unit;

import org.apache.calcite.util.Util;

import java.util.Objects;

import static java.util.Objects.requireNonNull;
Expand Down

0 comments on commit a9f0743

Please sign in to comment.