소스 검색

Make NoDiscard work on all types

Rune 2 달 전
부모
커밋
02fbbff2e9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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()