--- /dev/null
+// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
+// Line: 10
+
+using System.Runtime.InteropServices;
+
+class X {
+ static string dll = "some.dll";
+
+ [DllImport (dll)]
+ extern static void Blah ();
+}
-// CS0647: Error during emitting `System.Runtime.InteropServices.DllImportAttribute' attribute. The reason is `DllName cannot be empty'
+// CS0647: Error during emitting `System.Runtime.InteropServices.DllImportAttribute' attribute. The reason is `DllName cannot be empty or null'
// Line: 8
using System.Runtime.InteropServices;
-// CS0647: Error during emitting `System.Runtime.InteropServices.DllImportAttribute' attribute. The reason is `DllName cannot be empty'
+// CS0647: Error during emitting `System.Runtime.InteropServices.DllImportAttribute' attribute. The reason is `DllName cannot be empty or null'
// Line: 8
using System.Runtime.InteropServices;
if (pos_args.Count == 1 && pos_args[0].Expr is Constant) {
var value = ((Constant) pos_args[0].Expr).GetValue () as string;
if (string.IsNullOrEmpty (value))
- Error_AttributeEmitError ("DllName cannot be empty");
+ Error_AttributeEmitError ("DllName cannot be empty or null");
}
} else if (Type == predefined.MethodImpl && pt.BuiltinType == BuiltinTypeSpec.Type.Short &&
!System.Enum.IsDefined (typeof (MethodImplOptions), ((Constant) arg_expr).GetValue ().ToString ())) {