• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eclipse-aascw / aas-core-codegen / 36059472310
90%

Build:
DEFAULT BRANCH: main
Ran 24 Sep 2026 09:14PM UTC
Jobs 3
Files 285
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Sep 2026 09:07PM UTC coverage: 87.409% (+0.1%) from 87.314%
36059472310

push

github

web-flow
Transpile `isinstance` (#763)

We introduce ``isinstance`` in the transpilable code so that
the verification functions, which are implementation-specific in
aas-core-meta V3.2, can be transpiled.

The parse stage understands ``isinstance(x, C)`` and
``isinstance(x, (A, B))``. The type inference checks that the value is
a non-optional class or named union, and that each class is a strict
descendant of the value's class, or a root of its named union or
a descendant of a root, respectively.

A single-class ``isinstance`` narrows the value in the conjunctions,
implications, disjunctions of the form ``not isinstance(...) or ...``
and in the conditions of ``all`` and ``any``. The type inference
exposes the narrowed values as ``downcast_map`` together with their
type before the narrowing, so that the targets know where and how
to down-cast. To that end, ``infer_for_invariant`` now returns
an ``InferenceOfInvariant``.

All the targets transpile ``isinstance``. A value of a named union is
checked and down-cast through its underlying instance: ``Underlying``
in C#, ``getUnderlying()`` in Java, ``Underlying()`` in Go, and the new
public ``types::UnderlyingOf{Union}`` in C++. In TypeScript and Python,
a named union is a plain type alias, so no unwrapping is needed.

We also fix string comparisons in Java, which compared the references
instead of the values, the missing types package in the closures of
Go verification functions, and the lint error on unused dispatchers
of named unions in TypeScript.

465 of 519 new or added lines in 22 files covered. (89.6%)

37210 of 42570 relevant lines covered (87.41%)

2.62 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
63.86
2.64% aas_core_codegen/cpp/transpilation.py
10
68.64
1.57% aas_core_codegen/golang/transpilation.py
10
71.42
2.15% aas_core_codegen/intermediate/type_inference.py
6
77.06
-0.04% aas_core_codegen/parse/tree.py
4
70.29
2.22% aas_core_codegen/typescript/transpilation.py
3
71.62
2.18% aas_core_codegen/csharp/transpilation.py
3
68.04
1.95% aas_core_codegen/java/transpilation.py
3
83.33
0.61% aas_core_codegen/parse/_rules.py
1
70.35
0.84% aas_core_codegen/cpp/optionaling.py
1
69.03
0.26% aas_core_codegen/golang/pointering.py
1
85.83
0.06% aas_core_codegen/intermediate/_translate.py
1
69.55
0.29% aas_core_codegen/java/optional.py
1
65.68
1.11% aas_core_codegen/python/transpilation.py
Jobs
ID Job ID Ran Files Coverage
1 3.12 - 36059472310.1 24 Sep 2026 09:16PM UTC 285
87.41
GitHub Action Run
2 3.10 - 36059472310.2 24 Sep 2026 09:16PM UTC 285
87.41
GitHub Action Run
3 3.11 - 36059472310.3 24 Sep 2026 09:16PM UTC 285
87.41
GitHub Action Run
Source Files on build 36059472310
  • Tree
  • List 285
  • Changed 23
  • Source Changed 0
  • Coverage Changed 23
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 15d7f9a6 on github
  • Prev Build on main (#36051104665)
  • Next Build on main (#36061803732)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc