File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
lkql_checker/share/lkql/kp Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change 55@check(message="possible occurrence of KP T805-037")
66fun kp_t805_037(node) =
77 node is TypeDecl(
8- f_discriminants: part@KnownDiscriminantPart,
9- f_type_def: r@RecordTypeDef(f_record_def: def@RecordDef)
8+ f_discriminants: part@KnownDiscriminantPart,
9+ f_type_def: r@RecordTypeDef(f_record_def: def@RecordDef)
1010 ) when {
11- val discs = from part select DefiningName;
12- [decl for decl in
13- from def.f_components select c@ComponentDecl
14- when c.f_component_def.f_type_expr is
15- s@SubtypeIndication(f_constraint: CompositeConstraint(
16- p_is_discriminant_constraint(): true)
17- and [id for id in (from c.f_default_expr select Identifier)
18- if [d for d in discs if d.p_name_matches(id)]]]
11+ val discs = from part select DefiningName;
12+ [
13+ decl for decl in from def.f_components select c@ComponentDecl
14+ when c.f_component_def.f_type_expr is s@SubtypeIndication(
15+ f_constraint: CompositeConstraint(
16+ p_is_discriminant_constraint(): true
17+ )
18+ and [
19+ id for id in (from c.f_default_expr select Identifier)
20+ if [d for d in discs if d.p_name_matches(id)]
21+ ]
22+ ]
1923 }
20-
You can’t perform that action at this time.
0 commit comments