repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[mcs] Implements C# 7.2 readonly structs
[mono-project.git]
/
mcs
/
errors
/
cs0459-5.cs
blob
fa2cfd27dae1af8fd428a969817f0f1f94e9c5bc
1
// CS0459: Cannot take the address of `this' because it is read-only
2
// Line: 11
3
// Compiler options: -unsafe -langversion:latest
4
5
readonly struct
X
6
{
7
unsafe void
Test
()
8
{
9
fixed
(
X
*
x
= &
this
) {
10
11
}
12
}
13
}