lang: opt-in UFCS — ufcs-marked fns + alias dot-dispatch, generic binding via receiver; one binding builder for plan-side generic returns

This commit is contained in:
agra
2026-06-11 17:04:51 +03:00
parent 84e0fb0752
commit a47ea1416e
27 changed files with 316 additions and 137 deletions

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,8 @@
marked: 42
alias: 41
direct: 41
pipe: 41
marked-direct: 42
ptr-recv: 15
generic-dot: 7
generic-direct: 7

View File

@@ -1,5 +1,6 @@
create: 7 42
pipe-create: 1
dot-create: 2
alloc: 10 40 len=4
clone: 10 (orig 99)
resize: 20 60 len=6

View File

@@ -0,0 +1 @@
1

View File

@@ -0,0 +1,10 @@
error: 'bump' is not a ufcs function — a plain function does not dispatch via dot-call
--> examples/1166-diagnostics-ufcs-not-opted-in.sx:10:19
|
10 | print("{}\n", f.bump());
| ^^^^^^
help: call it directly (`bump(receiver, ...)`), pipe it (`receiver |> bump(...)`), or declare it `bump :: ufcs (...) { ... }`
|
10 | print("{}\n", f.bump());
| ^^^^^^

View File

@@ -0,0 +1 @@