repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Display error messages instead of stack traces.
[mcs.git]
/
errors
/
gcs0413.cs
blob
cbcfeff1fc49037f3ea922311b6553c60a068bf4
1
//gcs0413.cs: The as operator requires that the `T' type parameter be constrained by a class
2
// Line: 7
3
4
public class
SomeClass
{}
5
6
public class
Foo
<
T
> {
7
public
T
Do
(
object
o
)
{ return o as T; }
8
}
9
10
class
Driver
{
11
static void
Main
()
12
{
13
Foo
<
SomeClass
>
f
=
new
Foo
<
SomeClass
> ();
14
f
.
Do
(
"something"
);
15
}
16
}
17
18