Explorar o código

Make NoDiscard work on all types

Rune hai 2 meses
pai
achega
02fbbff2e9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      BeefLibs/corlib/src/Attribute.bf

+ 1 - 1
BeefLibs/corlib/src/Attribute.bf

@@ -559,7 +559,7 @@ namespace System
 
 	/// If [NoDiscard] is used on a method, the the compiler will show a warning if the result is discarded.
 	/// If used on a type, the compiler will show an warning if any method returns that type and the caller discards the result.
-	[AttributeUsage(.Method | .Class | .Struct)]
+	[AttributeUsage(.Method | .Types)]
 	public struct NoDiscardAttribute : Attribute
 	{
 		public this()