Skip to content

Conversation

@jonasstrehle
Copy link
Member

@jonasstrehle jonasstrehle commented Nov 11, 2025

This PR adds support for the variant access mechanism in type infer.

typealias myInteger = integer;

myInteger/u8 -> Shall resolve to core:integer/u8

Also adds property access.

Closes #499

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

Test Results

588 tests  +15   588 ✅ +15   33s ⏱️ -37s
  6 suites ± 0     0 💤 ± 0 
  1 files   ± 0     0 ❌ ± 0 

Results for commit 94fba5d. ± Comparison against base commit 0509b11.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

🐰 Bencher Report

Branchfeat/variant-access
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (µs)
(Result Δ%)
Upper Boundary
microseconds (µs)
(Limit %)
dxb to json/test1.json📈 view plot
🚷 view threshold
61.49 µs
(-3.50%)Baseline: 63.72 µs
67.46 µs
(91.15%)
dxb to json/test2.json📈 view plot
🚷 view threshold
12,851.00 µs
(-2.88%)Baseline: 13,232.71 µs
13,880.43 µs
(92.58%)
dxb to json/test3.json📈 view plot
🚷 view threshold
140,390.00 µs
(-1.47%)Baseline: 142,481.43 µs
148,131.23 µs
(94.77%)
dxb to runtime value/test1.json📈 view plot
🚷 view threshold
56.12 µs
(+40.64%)Baseline: 39.90 µs
60.87 µs
(92.19%)
dxb to runtime value/test2.json📈 view plot
🚷 view threshold
16,077.00 µs
(+44.35%)Baseline: 11,137.29 µs
17,606.32 µs
(91.31%)
dxb to runtime value/test3.json📈 view plot
🚷 view threshold
170,530.00 µs
(+73.99%)Baseline: 98,011.86 µs
191,198.56 µs
(89.19%)
json to dxb/test1.json📈 view plot
🚷 view threshold
8,173.70 µs
(+375.93%)Baseline: 1,717.41 µs
10,000.95 µs
(81.73%)
json to dxb/test2.json📈 view plot
🚷 view threshold
8,431,200.00 µs
(+517.18%)Baseline: 1,366,080.00 µs
10,430,559.42 µs
(80.83%)
json to dxb/test3.json📈 view plot
🚷 view threshold
48,529,000.00 µs
(+466.01%)Baseline: 8,573,928.57 µs
59,835,865.56 µs
(81.10%)
json to runtime value datex auto static detection/test1.json📈 view plot
🚷 view threshold
8,240.80 µs
(+375.09%)Baseline: 1,734.59 µs
10,082.01 µs
(81.74%)
json to runtime value datex auto static detection/test2.json📈 view plot
🚷 view threshold
8,467,600.00 µs
(+515.21%)Baseline: 1,376,367.14 µs
10,474,350.96 µs
(80.84%)
json to runtime value datex auto static detection/test3.json📈 view plot
🚷 view threshold
48,776,000.00 µs
(+462.48%)Baseline: 8,671,557.14 µs
60,125,161.02 µs
(81.12%)
json to runtime value datex forced static/test1.json📈 view plot
🚷 view threshold
8,323.50 µs
(+378.26%)Baseline: 1,740.36 µs
10,186.47 µs
(81.71%)
json to runtime value datex forced static/test2.json📈 view plot
🚷 view threshold
8,601,800.00 µs
(+517.70%)Baseline: 1,392,561.43 µs
10,641,944.55 µs
(80.83%)
json to runtime value datex forced static/test3.json📈 view plot
🚷 view threshold
49,392,000.00 µs
(+466.63%)Baseline: 8,716,800.00 µs
60,902,661.77 µs
(81.10%)
json to runtime value datex/test1.json📈 view plot
🚷 view threshold
8,071.50 µs
(+370.69%)Baseline: 1,714.82 µs
9,870.38 µs
(81.77%)
json to runtime value datex/test2.json📈 view plot
🚷 view threshold
8,492,800.00 µs
(+514.02%)Baseline: 1,383,141.43 µs
10,504,766.94 µs
(80.85%)
json to runtime value datex/test3.json📈 view plot
🚷 view threshold
48,842,000.00 µs
(+461.38%)Baseline: 8,700,400.00 µs
60,201,660.71 µs
(81.13%)
json to runtime value json_syntax/test1.json📈 view plot
🚷 view threshold
22.24 µs
(+8.93%)Baseline: 20.42 µs
22.93 µs
(97.00%)
json to runtime value json_syntax/test2.json📈 view plot
🚷 view threshold
6,820.40 µs
(+3.42%)Baseline: 6,595.03 µs
7,106.44 µs
(95.97%)
json to runtime value json_syntax/test3.json📈 view plot
🚷 view threshold
71,100.00 µs
(-13.66%)Baseline: 82,352.57 µs
96,965.24 µs
(73.33%)
json to runtime value serde_json/test1.json📈 view plot
🚷 view threshold
6.22 µs
(-0.97%)Baseline: 6.28 µs
6.53 µs
(95.27%)
json to runtime value serde_json/test2.json📈 view plot
🚷 view threshold
1,998.00 µs
(-5.72%)Baseline: 2,119.14 µs
2,279.52 µs
(87.65%)
json to runtime value serde_json/test3.json📈 view plot
🚷 view threshold
16,345.00 µs
(-0.59%)Baseline: 16,442.14 µs
18,011.54 µs
(90.75%)
runtime init📈 view plot
🚷 view threshold
31.12 µs
(-77.50%)Baseline: 138.31 µs
1,198.65 µs
(2.60%)
runtime value to dxb/test1.json📈 view plot
🚷 view threshold
5.83 µs
(+59.31%)Baseline: 3.66 µs
6.44 µs
(90.46%)
runtime value to dxb/test2.json📈 view plot
🚷 view threshold
1,736.00 µs
(+75.52%)Baseline: 989.05 µs
1,947.45 µs
(89.14%)
runtime value to dxb/test3.json📈 view plot
🚷 view threshold
19,537.00 µs
(+90.78%)Baseline: 10,240.36 µs
22,205.19 µs
(87.98%)
runtime value to json datex/test1.json📈 view plot
🚷 view threshold
68.68 µs
(+0.47%)Baseline: 68.35 µs
71.31 µs
(96.31%)
runtime value to json datex/test2.json📈 view plot
🚷 view threshold
15,122.00 µs
(+4.90%)Baseline: 14,415.43 µs
15,448.58 µs
(97.89%)
runtime value to json datex/test3.json📈 view plot
🚷 view threshold
160,780.00 µs
(+3.82%)Baseline: 154,867.14 µs
164,089.10 µs
(97.98%)
runtime value to json json_syntax/test1.json📈 view plot
🚷 view threshold
10.60 µs
(-1.11%)Baseline: 10.72 µs
11.05 µs
(95.95%)
runtime value to json json_syntax/test2.json📈 view plot
🚷 view threshold
4,316.80 µs
(-4.53%)Baseline: 4,521.84 µs
4,824.18 µs
(89.48%)
runtime value to json json_syntax/test3.json📈 view plot
🚷 view threshold
63,751.00 µs
(-0.00%)Baseline: 63,751.29 µs
70,288.61 µs
(90.70%)
runtime value to json serde_json/test1.json📈 view plot
🚷 view threshold
3.04 µs
(+2.83%)Baseline: 2.95 µs
3.34 µs
(90.83%)
runtime value to json serde_json/test2.json📈 view plot
🚷 view threshold
971.56 µs
(-1.60%)Baseline: 987.34 µs
1,153.84 µs
(84.20%)
runtime value to json serde_json/test3.json📈 view plot
🚷 view threshold
10,437.00 µs
(+3.09%)Baseline: 10,124.27 µs
12,258.31 µs
(85.14%)
🐰 View full continuous benchmarking report in Bencher

@jonasstrehle jonasstrehle changed the title Variant access Variant and property access Nov 15, 2025
@benStre benStre force-pushed the feat/variant-access branch from af0fc44 to 94fba5d Compare November 24, 2025 23:22
@benStre benStre force-pushed the feat/variant-access branch from d474eca to 88a33ca Compare November 26, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle variant access / division logic in type inferrer

3 participants