File tree Expand file tree Collapse file tree 3 files changed +34
-1
lines changed Expand file tree Collapse file tree 3 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ class CFGCollectorAndTyper {
57
57
58
58
void preTransformMethodDef (core::Context ctx, ast::ExpressionPtr &tree) {
59
59
auto &m = ast::cast_tree_nonnull<ast::MethodDef>(tree);
60
- if (ctx.file .data (ctx).strictLevel < core::StrictLevel::True || m.symbol .data (ctx)->flags .isOverloaded ||
60
+ // With scip-ruby, we might as well try making progress with untyped code.
61
+ auto minStrictLevel = ctx.state .isSCIPRuby ? core::StrictLevel::False : core::StrictLevel::True;
62
+ if (ctx.file .data (ctx).strictLevel < minStrictLevel || m.symbol .data (ctx)->flags .isOverloaded ||
61
63
(m.symbol .data (ctx)->flags .isAbstract && ctx.file .data (ctx).compiledLevel != core::CompiledLevel::True)) {
62
64
return ;
63
65
}
Original file line number Diff line number Diff line change
1
+ # typed: false
2
+
3
+ class C
4
+ def f
5
+ @f = 0
6
+ end
7
+
8
+ def g ( x )
9
+ x + @f + f
10
+ end
11
+ end
Original file line number Diff line number Diff line change
1
+ # typed: false
2
+
3
+ class C
4
+ # ^ definition [..] C#
5
+ def f
6
+ # ^ definition [..] C#f().
7
+ @f = 0
8
+ # ^^ definition [..] C#`@f`.
9
+ # ^^^^^^ reference [..] C#`@f`.
10
+ end
11
+
12
+ def g ( x )
13
+ # ^ definition [..] C#g().
14
+ # ^ definition local 1~#3792446982
15
+ x + @f + f
16
+ # ^ reference local 1~#3792446982
17
+ # ^^ reference [..] C#`@f`.
18
+ # ^ reference [..] C#f().
19
+ end
20
+ end
You can’t perform that action at this time.
0 commit comments