@@ -767,25 +767,22 @@ class Foo
767767 end
768768 RUBY
769769
770- # The @rbs annotations should be reported as syntax errors (invalid format )
770+ # The @rbs annotations should be reported as unused (ParamTypeAnnotation is valid but not applicable to attr_* )
771771 assert_equal 3 , result . diagnostics . size
772772
773773 assert_any! ( result . diagnostics ) do |diagnostic |
774- assert_instance_of RBS ::InlineParser ::Diagnostic ::AnnotationSyntaxError , diagnostic
774+ assert_instance_of RBS ::InlineParser ::Diagnostic ::UnusedInlineAnnotation , diagnostic
775775 assert_equal "@rbs name: String" , diagnostic . location . source
776- assert_match ( /Syntax error:/ , diagnostic . message )
777776 end
778777
779778 assert_any! ( result . diagnostics ) do |diagnostic |
780- assert_instance_of RBS ::InlineParser ::Diagnostic ::AnnotationSyntaxError , diagnostic
779+ assert_instance_of RBS ::InlineParser ::Diagnostic ::UnusedInlineAnnotation , diagnostic
781780 assert_equal "@rbs age: Integer" , diagnostic . location . source
782- assert_match ( /Syntax error:/ , diagnostic . message )
783781 end
784782
785783 assert_any! ( result . diagnostics ) do |diagnostic |
786- assert_instance_of RBS ::InlineParser ::Diagnostic ::AnnotationSyntaxError , diagnostic
784+ assert_instance_of RBS ::InlineParser ::Diagnostic ::UnusedInlineAnnotation , diagnostic
787785 assert_equal "@rbs data: Array[Hash[Symbol, untyped]]" , diagnostic . location . source
788- assert_match ( /Syntax error:/ , diagnostic . message )
789786 end
790787
791788 result . declarations [ 0 ] . tap do |decl |
0 commit comments