Skip to content

Commit

Permalink
allow parameterised type construct names during lint (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacLN authored Aug 8, 2017
1 parent 5ae255a commit c37b7a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/trav/lint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ function lint(x::EXPR{CSTParser.Mutable}, s::TopLevelScope, L::LintState, server
for a in x.args[3].args
if CSTParser.declares_function(a)
fname = CSTParser._get_fname(CSTParser._get_fsig(a))
if fname.val != name.val
if fname.val != name.val && !(fname isa EXPR{CSTParser.InvisBrackets} && fname.args[2] isa EXPR{CSTParser.UnarySyntaxOpCall} && fname.args[2].args[1] isa EXPR{CSTParser.OPERATOR{CSTParser.DeclarationOp,Tokens.DECLARATION,false}})
push!(L.diagnostics, CSTParser.Diagnostic{CSTParser.Diagnostics.MisnamedConstructor}(offset + (0:a.span), [], "Constructor name does not match type name"))
end
end
Expand Down

0 comments on commit c37b7a7

Please sign in to comment.