FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cppfront/regression-tests/pure2-deducing-pointers-error.cpp2 at main · gregmarr/cppfront · GitHub
gregmarr
/
cppfront
Public
forked from
hsutter/cppfront
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cppfront
/
regression-tests
/
pure2-deducing-pointers-error.cpp2
Copy path
More file actions
More file actions
Latest commit
History
History
History
42 lines (31 loc) · 676 Bytes
Breadcrumbs
cppfront
/
regression-tests
/
pure2-deducing-pointers-error.cpp2
Copy path
File metadata and controls
42 lines (31 loc) · 676 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
fun: (inout i:int) -> *int = {
return i&;
}
fun2: (inout i:int) -> (result : *int) = {
result = i&;
}
main: () -> int = {
a: int = 2;
pa: *int = a&;
ppa: **int = pa&;
pa = 0; // caught
pa2:= ppa*;
pa2 = 0; // caught
pa3 := a&;
pa3 = 0; // caught
pa3 += 2; // caught
ppa2 := pa2&;
pa4 := ppa2*;
pa4 = 0; // caught
pppa := ppa&;
pa5 := pppa**;
pa5 = 0; // caught
fun(a)++; // caught
fp := fun(a);
fp = 0; // caught
f := fun(a)*;
_ = f;
fp2 := fun2(a).result;
fp2--; // not caught :(
return a * pa* * ppa**; // 8
}
Back
|
FazBrowse Home
|
New Git URL