Skip to content

Commit

Permalink
Merge branch 'protect-internal-methods-tc3' into 'dev'
Browse files Browse the repository at this point in the history
protect internal methods

See merge request monticore/monticore!1050
  • Loading branch information
SE-FDr committed Oct 28, 2024
2 parents 1c4b49c + 9d58072 commit c098e07
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,36 +80,36 @@ public InferenceContext4Ast getCtx4Ast() {
//-----------TypeCheck3 static delegate implementation----------//

@Override
public SymTypeExpression _symTypeFromAST(ASTMCType mcType) {
protected SymTypeExpression _symTypeFromAST(ASTMCType mcType) {
if (!getType4Ast().hasTypeOfTypeIdentifier(mcType)) {
mcType.accept(getTypeTraverser());
}
return getType4Ast().getPartialTypeOfTypeId(mcType);
}

@Override
public SymTypeExpression _symTypeFromAST(ASTMCVoidType mcVoidType) {
protected SymTypeExpression _symTypeFromAST(ASTMCVoidType mcVoidType) {
return SymTypeExpressionFactory.createTypeVoid();
}

@Override
public SymTypeExpression _symTypeFromAST(ASTMCReturnType mcReturnType) {
protected SymTypeExpression _symTypeFromAST(ASTMCReturnType mcReturnType) {
if (!getType4Ast().hasTypeOfTypeIdentifier(mcReturnType)) {
mcReturnType.accept(getTypeTraverser());
}
return getType4Ast().getPartialTypeOfTypeId(mcReturnType);
}

@Override
public SymTypeExpression _symTypeFromAST(ASTMCQualifiedName mcQualifiedName) {
protected SymTypeExpression _symTypeFromAST(ASTMCQualifiedName mcQualifiedName) {
if (!getType4Ast().hasTypeOfTypeIdentifier(mcQualifiedName)) {
mcQualifiedName.accept(getTypeTraverser());
}
return getType4Ast().getPartialTypeOfTypeId(mcQualifiedName);
}

@Override
public SymTypeExpression _typeOf(ASTExpression expr) {
protected SymTypeExpression _typeOf(ASTExpression expr) {
// do not reset if target typing had been used, as currently,
// there is no target type
if (getCtx4Ast().getContextOfExpression(expr).hasTargetType() &&
Expand All @@ -131,7 +131,7 @@ public SymTypeExpression _typeOf(ASTExpression expr) {
}

@Override
public SymTypeExpression _typeOf(
protected SymTypeExpression _typeOf(
ASTExpression expr,
SymTypeExpression targetType
) {
Expand Down Expand Up @@ -195,7 +195,7 @@ else if (getType4Ast().hasPartialTypeOfExpression(expr) &&
}

@Override
public SymTypeExpression _typeOf(ASTLiteral lit) {
protected SymTypeExpression _typeOf(ASTLiteral lit) {
if (!getType4Ast().hasTypeOfExpression(lit)) {
lit.accept(getTypeTraverser());
}
Expand Down

0 comments on commit c098e07

Please sign in to comment.