2
0
Эх сурвалжийг харах

Merge pull request #2295 from Rune-Magic/patch-1

Make NoDiscard work on all types
Brian Fiete 1 долоо хоног өмнө
parent
commit
17d612c314

+ 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()