projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e263257
)
Check inaccessible type arguments
author
Marek Safar
<marek.safar@gmail.com>
Fri, 13 Aug 2010 16:28:36 +0000
(17:28 +0100)
committer
Marek Safar
<marek.safar@gmail.com>
Fri, 13 Aug 2010 16:49:30 +0000
(17:49 +0100)
mcs/mcs/ecore.cs
patch
|
blob
|
history
diff --git
a/mcs/mcs/ecore.cs
b/mcs/mcs/ecore.cs
index 76db0ba722937f613f7c18bb47f818e7f3443249..cddac71e395b369d9bc3eed5612c7c3745fb52d6 100644
(file)
--- a/
mcs/mcs/ecore.cs
+++ b/
mcs/mcs/ecore.cs
@@
-4235,6
+4235,20
@@
namespace Mono.CSharp {
Expression.UnsafeError (ec, loc);
}
+ //
+ // We could infer inaccesible type arguments
+ //
+ if (type_arguments == null && member.IsGeneric) {
+ var ms = (MethodSpec) member;
+ foreach (var ta in ms.TypeArguments) {
+ if (!ta.IsAccessible (ec.CurrentType)) {
+ ec.Report.SymbolRelatedToPreviousError (ta);
+ Expression.ErrorIsInaccesible (ec, member.GetSignatureForError (), loc);
+ break;
+ }
+ }
+ }
+
return true;
}
}