Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mcs/mcs/generic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,8 @@ protected override bool IsNotCLSCompliant ()
return true;

foreach (var ta in TypeArguments) {
if (ta == InternalType.Dynamic)
return false;
if (ta.MemberDefinition.IsNotCLSCompliant ())
return true;
}
Expand Down
15 changes: 15 additions & 0 deletions mcs/tests/dtest-037.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;

[assembly:CLSCompliant(true)]

public class A
{
public static void Main ()
{
}

public void CLSCompliantMethod (IEnumerable<dynamic> parameter)
{
}
}
13 changes: 13 additions & 0 deletions mcs/tests/ver-il-dmcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2296,6 +2296,19 @@
</method>
</type>
</test>
<test name="dtest-037.cs">
<type name="A">
<method name="Void Main()">
<size>1</size>
</method>
<method name="Void CLSCompliantMethod(IEnumerable`1)">
<size>1</size>
</method>
<method name="Void .ctor()">
<size>7</size>
</method>
</type>
</test>
<test name="dtest-collectioninit-01.cs">
<type name="Test">
<method name="Int32 Main()">
Expand Down