-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Julia Type Hint #160
Labels
Milestone
Comments
This feature requires type inference |
just needs a API to get return type from PSI |
The return type must be inferred |
What's the rule of parsing version number?
Can we report errors on this? |
zxj5470
added a commit
that referenced
this issue
Oct 2, 2018
66666666666666666 |
add an option for versionString in Annotator to check it... |
Do we need to transform these into Kotlin? function VersionNumber(major::VInt, minor::VInt, patch::VInt,
pre::Tuple{Vararg{Union{UInt64,String}}},
bld::Tuple{Vararg{Union{UInt64,String}}})
major >= 0 || throw(ArgumentError("invalid negative major version: $major"))
minor >= 0 || throw(ArgumentError("invalid negative minor version: $minor"))
patch >= 0 || throw(ArgumentError("invalid negative patch version: $patch"))
for ident in pre
if ident isa Integer
ident >= 0 || throw(ArgumentError("invalid negative pre-release identifier: $ident"))
else
if !occursin(r"^(?:|[0-9a-z-]*[a-z-][0-9a-z-]*)$"i, ident) ||
isempty(ident) && !(length(pre)==1 && isempty(bld))
throw(ArgumentError("invalid pre-release identifier: $(repr(ident))"))
end
end
end
for ident in bld
if ident isa Integer
ident >= 0 || throw(ArgumentError("invalid negative build identifier: $ident"))
else
if !occursin(r"^(?:|[0-9a-z-]*[a-z-][0-9a-z-]*)$"i, ident) ||
isempty(ident) && length(bld)!=1
throw(ArgumentError("invalid build identifier: $(repr(ident))"))
end
end
end
new(major, minor, patch, pre, bld)
end |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just like Kotlin type Hint or JavaX-Var-Hint
The text was updated successfully, but these errors were encountered: