fix #1341
This commit is contained in:
parent
184df10253
commit
43dca6a8db
|
|
@ -1586,9 +1586,18 @@ namespace CodeCompletion
|
|||
else
|
||||
suffix = "";
|
||||
if (i > 0)
|
||||
{
|
||||
returned_scope = returned_scope.FindNameOnlyInType(_template_type_reference.name.names[i].name + suffix);
|
||||
if (returned_scope == null)
|
||||
returned_scope = returned_scope.FindNameOnlyInType(_template_type_reference.name.names[i].name + suffix);
|
||||
}
|
||||
else
|
||||
{
|
||||
returned_scope = returned_scope.FindName(_template_type_reference.name.names[i].name + suffix);
|
||||
if (returned_scope == null)
|
||||
returned_scope = returned_scope.FindName(_template_type_reference.name.names[i].name);
|
||||
}
|
||||
|
||||
if (returned_scope == null)
|
||||
return;
|
||||
}
|
||||
|
|
@ -1890,5 +1899,12 @@ namespace CodeCompletion
|
|||
public override void visit(semantic_type_node stn) // SSM
|
||||
{
|
||||
}
|
||||
public override void visit(tuple_node _tuple_node)
|
||||
{
|
||||
method_call mc = new method_call();
|
||||
mc.parameters = _tuple_node.el;
|
||||
mc.dereferencing_value = new dot_node(new ident("Tuple"), new ident("Create"));
|
||||
mc.visit(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3
TestSuite/intellisense_tests/tuple6.pas
Normal file
3
TestSuite/intellisense_tests/tuple6.pas
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
begin
|
||||
var x := (1,2.3).Item2{@property Tuple<>.Item2: real; readonly;@};
|
||||
end.
|
||||
|
|
@ -36,6 +36,11 @@ namespace VisualPascalABC
|
|||
List<PascalABCCompiler.Errors.Error> Errors = new List<PascalABCCompiler.Errors.Error>();
|
||||
PascalABCCompiler.SyntaxTree.expression tree = WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.StandartCompiler.ParsersController.GetExpression("test" + Path.GetExtension(FileName), expr, Errors, new List<PascalABCCompiler.Errors.CompilerWarning>());
|
||||
bool header = false;
|
||||
if (Errors.Count > 0 && expr.IndexOf('<') != -1 && expr.IndexOf('>') != -1)
|
||||
{
|
||||
Errors.Clear();
|
||||
tree = WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.StandartCompiler.ParsersController.GetExpression("test" + Path.GetExtension(FileName), expr.Replace("<","&<"), Errors, new List<PascalABCCompiler.Errors.CompilerWarning>());
|
||||
}
|
||||
if (tree == null || Errors.Count > 0)
|
||||
{
|
||||
Errors.Clear();
|
||||
|
|
|
|||
Loading…
Reference in a new issue