Skip to content

Commit

Permalink
Couple of import/export/struct fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed Mar 2, 2019
1 parent 5434655 commit 5c8e530
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public void typeCheck()
{
try
{
d.apply(tc, new TypeCheckInfo(assistantFactory, e, NameScope.NAMES));
d.apply(tc, new TypeCheckInfo(assistantFactory, e, NameScope.NAMES).newModule(m.getName().getName()));
// System.out.println();
} catch (TypeCheckException te)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class IsEqVisitor extends QuestionAnswerAdaptor<ILexLocation, Boolean>
@Override public Boolean caseANamedInvariantType(ANamedInvariantType node,
ILexLocation q) throws AnalysisException
{
if (TypeChecker.isOpaque(node, node.getLocation().getModule()))
if (TypeChecker.isOpaque(node, q.getModule()))
return false;
if (node.getEqDef() != null)
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package org.overture.typechecker.utilities.type;

import com.sun.org.apache.xpath.internal.operations.Bool;

import org.overture.ast.analysis.AnalysisException;
import org.overture.ast.analysis.AnswerAdaptor;
import org.overture.ast.analysis.QuestionAnswerAdaptor;
import org.overture.ast.intf.lex.ILexLocation;
import org.overture.ast.node.INode;
Expand All @@ -20,7 +17,7 @@ public class IsOrderedVisitor
@Override public Boolean caseANamedInvariantType(ANamedInvariantType node,
ILexLocation q) throws AnalysisException
{
if (TypeChecker.isOpaque(node, node.getLocation().getModule()))
if (TypeChecker.isOpaque(node, q.getModule()))
return false;
if (node.getOrdDef() != null)
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,7 @@ else if (question.assistantFactory.createPTypeAssistant().isType(node.getLeft().

node.setRecordType((ARecordInvariantType) rec);

if (TypeChecker.isOpaque(node.getRecordType(), node.getRecordType().getLocation().getModule()))
if (TypeChecker.isOpaque(node.getRecordType(), question.fromModule))
{
TypeCheckerErrors.report(3127, "Type '" + node.getTypeName()
+ "' has no struct export", node.getLocation(), node);
Expand Down

0 comments on commit 5c8e530

Please sign in to comment.