Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Компилятор падает, если элемент перечисления это побитовая операция других полей #3097

Open
samuraiGH opened this issue Apr 23, 2024 · 0 comments

Comments

@samuraiGH
Copy link
Contributor

type
  enum = (
    item1,
    item2,
    item3 = item1 or item2
  );

begin end.
Внутренняя ошибка компилятора в модуле [pabcnetc.exe] :'System.Exception: System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.find_operator(String name, expression_node left, expression_node right, location loc, Boolean no_search_in_extension_methods)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(bin_expr _bin_expr)
   в PascalABCCompiler.TreeConverter.returner.visit(expression expr)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.convert_strong(expression expr)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.convert_strong_to_constant_node(expression expr, type_node tn)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(enum_type_definition _enum_type_definition)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.convert_strong(type_definition type_def)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(type_declaration _type_declaration)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(type_declarations _type_declarations)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(declarations _subprogram_definitions)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(block _block)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(program_module _program_module)
   в PascalABCCompiler.TreeConverter.SyntaxTreeToSemanticTreeConverter.CompileInterface(compilation_unit SyntaxUnit, unit_node_list UsedUnits, List`1 ErrorsList, List`1 WarningsList, SyntaxError parser_error, Hashtable bad_nodes, using_namespace_list namespaces, Dictionary`2 docs, Boolean debug, Boolean debugging, Boolean for_intellisense, List`1 CompiledVariables)
   в PascalABCCompiler.Compiler.CompileCurrentUnitInterface(String UnitFileName, CompilationUnit currentUnit, Dictionary`2 docs)
   в PascalABCCompiler.Compiler.CompileUnit(unit_node_list unitsFromUsesSection, Dictionary`2 directUnitsFromUsesSection, unit_or_namespace currentUnitNode, String previousPath)
   в PascalABCCompiler.Compiler.Compile() System.Exception: System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.find_operator(String name, expression_node left, expression_node right, location loc, Boolean no_search_in_extension_methods)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(bin_expr _bin_expr)
   в PascalABCCompiler.TreeConverter.returner.visit(expression expr)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.convert_strong(expression expr)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.convert_strong_to_constant_node(expression expr, type_node tn)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(enum_type_definition _enum_type_definition)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.convert_strong(type_definition type_def)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(type_declaration _type_declaration)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(type_declarations _type_declarations)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(declarations _subprogram_definitions)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(block _block)
   в PascalABCCompiler.TreeConverter.syntax_tree_visitor.visit(program_module _program_module)
   в PascalABCCompiler.TreeConverter.SyntaxTreeToSemanticTreeConverter.CompileInterface(compilation_unit SyntaxUnit, unit_node_list UsedUnits, List`1 ErrorsList, List`1 WarningsList, SyntaxError parser_error, Hashtable bad_nodes, using_namespace_list namespaces, Dictionary`2 docs, Boolean debug, Boolean debugging, Boolean for_intellisense, List`1 CompiledVariables)
   в PascalABCCompiler.Compiler.CompileCurrentUnitInterface(String UnitFileName, CompilationUnit currentUnit, Dictionary`2 docs)
   в PascalABCCompiler.Compiler.CompileUnit(unit_node_list unitsFromUsesSection, Dictionary`2 directUnitsFromUsesSection, unit_or_namespace currentUnitNode, String previousPath)
   в PascalABCCompiler.Compiler.Compile()'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant