$Deprecated
def foobar; end
The source code compiler doesn't support annotation values, but the
bytecode backend should support string, class, and annotation values,
as well as arrays of those types. We use square brackets instead of
parens around the values:
$Foo["xyz"]
$Bar["a" => "A"]
Nope. I'm not sure what the syntax for that would be. Right now I
believe we support class, method and field annotations. For fields
you have to put the annotation on the first use of the field. Eg
def initialize
$Deprecated
@foo = String(nil)
end
Hi, all.
Does that mean that if Foo.mirah contains an annotation with a value,
> The source code compiler doesn't support annotation values, but the
> bytecode backend should support string, class, and annotation values,
> as well as arrays of those types.
that "mirahc Foo.mirah" should work, but "mirahc -j Foo.mirah" not so
much?
> We use square brackets instead ofI couldn't make this work with the bytecode backend at all. For
> parens around the values:
>
> $Foo["xyz"]
> $Bar["a" => "A"]
example, a JAX-RS annotation like $Path["/foo"] produces "undefined
method `[]' for nil:NilClass." What am I missing?