Skip to content

Inline values are shown for a variable in different scope if it has same name in current scope #19215

Closed

Description

Testing #18670

Using Node

See the inline values for variable a under function c scope and in current scope.

image

Activity

  1. isidorn commented on Jan 24, 2017

    @isidorn

    Sandeep Somavarapu (@sandy081) please provide this repository so I can easily reporduce this - thanks

  2. sandy081 commented on Jan 24, 2017

    @sandy081
    MemberAuthor

    Isidor Nikolic (@isidorn) It's our smoke test express repository and modified the file index.js. Here is the code

    var express = require('express');
    var router = express.Router();
    
    function c() {
      return {
        a: 1
      }
    }
    
    /* GET home page. */
    router.get('/', function(req, res, next) {
    
      var a = 1234;
    
      if (a === 1234) {
        a = 3;
        var b = 2345;
        var a = 4;
      } else {
        var b = 5678;
      }
      a = c().a;
      a = 5678;
    
      console.log(c);
      res.render('index', { title: 'Express' });
    
    });
    
    module.exports = router;
  3. isidorn commented on Jan 24, 2017

    @isidorn
  4. sandy081 commented on Jan 24, 2017

    @sandy081
    MemberAuthor

    Isidor Nikolic (@isidorn) Updated the description it is happening with Node not with Node2. If scopes are not supported by Node, please close it

  5. isidorn commented on Jan 24, 2017

    @isidorn

    Scopes are not supported by node

  6. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions