fix array type inferrence for file#toArray from being so wonky - fixes #1355
This commit is contained in:
parent
19b05b5e61
commit
ab59fd08e5
@ -1048,7 +1048,7 @@ export default class TraversalPath {
|
||||
var type = typeInfo.annotation;
|
||||
if (!type) return false;
|
||||
|
||||
if (type.inferred && opts.inference === false) {
|
||||
if (typeInfo.inferred && opts.inference === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -397,7 +397,7 @@ export default class Scope {
|
||||
|
||||
if (t.isIdentifier(node)) {
|
||||
var binding = this.getBinding(node.name);
|
||||
if (binding && binding.isTypeGeneric("Array", { inference: false })) return node;
|
||||
if (binding && binding.constant && binding.isTypeGeneric("Array")) return node;
|
||||
}
|
||||
|
||||
if (t.isArrayExpression(node)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user