Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public partial class HqlSqlWalker
private readonly LiteralProcessor _literalProcessor;

private readonly IDictionary<string, string> _tokenReplacements;
private readonly IDictionary<IParameterSpecification, IType> _guessedParameterTypes = new Dictionary<IParameterSpecification, IType>();

private JoinType _impliedJoinType;

Expand Down Expand Up @@ -93,21 +92,6 @@ public override void ReportError(RecognitionException e)
_parseErrorHandler.ReportError(e);
}

internal IStatement Transform()
{
var tree = (IStatement) statement().Tree;
// Use the guessed type in case we weren't been able to detect the type
foreach (var parameter in _parameters)
{
if (parameter.ExpectedType == null && _guessedParameterTypes.TryGetValue(parameter, out var guessedType))
{
parameter.ExpectedType = guessedType;
}
}

return tree;
}

/*
protected override void Mismatch(IIntStream input, int ttype, BitSet follow)
{
Expand Down Expand Up @@ -1176,7 +1160,6 @@ IASTNode GenerateNamedParameter(IASTNode delimiterNode, IASTNode nameNode)
// when the parameter is used as an argument.
if (isGuessedType)
{
_guessedParameterTypes[paramSpec] = type;
parameter.GuessedType = type;
}
else
Expand Down
3 changes: 1 addition & 2 deletions src/NHibernate/Hql/Ast/ANTLR/QueryTranslatorImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,7 @@ public IStatement Translate()

try
{
// Transform the tree.
_resultAst = hqlSqlWalker.Transform();
_resultAst = (IStatement) hqlSqlWalker.statement().Tree;
}
finally
{
Expand Down