Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/doc/commands/commands_usage.nit
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ private class MPropertyCallVisitor
do
node.visit_all(self)
if not node isa ASendExpr then return
calls.add node.callsite.as(not null).mproperty
var callsite = node.callsite
if callsite == null then return
calls.add callsite.mproperty
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/doc/term/term.nit
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ redef class CommandParser
error.print_message(no_color)
print ""
end
if cmd == null then return
if cmd == null or error isa CmdError then return
cmd.execute(no_color)
end
end
Expand Down
2 changes: 2 additions & 0 deletions tests/nitx.args
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
base_simple3.nit -c A --no-color
base_simple3.nit -c foo --no-color
base_simple3.nit -c "defs: base_simple3::base_simple3" --no-color
base_simple3.nit -c "lin: NotAnEntity" --no-color
nitx_annotation_args.nit -I ../lib/core -c "call: nitx_annotation_args::A::foo" --no-color
30 changes: 30 additions & 0 deletions tests/nitx_annotation_args.nit
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file is part of NIT ( http://www.nitlanguage.org ).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module nitx_annotation_args

import kernel

class A
autoinit y

var x = 0 is writable(set_x)

var y: Int

fun foo do end
end

var a = new A(1)
a.foo
4 changes: 4 additions & 0 deletions tests/sav/nitx_args4.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

No result found for `NotAnEntity`...


8 changes: 8 additions & 0 deletions tests/sav/nitx_args5.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

Methods calling `nitx_annotation_args::A::foo`:

* nitx_annotation_args::nitx_annotation_args$core::Sys$main
# The main method of a program.
redef fun main
nitx_annotation_args.nit:29,1--30,5

Loading