sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: Camera calibration thoughts
Labels: RFC

I'm trying to use the calibrateCamera function to calibrate an industrial camera but it doesn't give the results I'm expecting. I took 10 pictures. 
I'm using a planar calibration pattern with about one thousand of points.
I know that I cannot have a sub pixel accuracy for the all detected points but I'm pretty sure that a subset of them (between 50 and 75 %) are below one pixel of reprojection.

The OpenCV documentation said that the method for a planar pattern is implemented with "A Flexible New Technique for Camera Calibration" from Zhengyou Zhang. So I decided to implement it.

The first step of this method is to estimate homographies to have a guess of the calibration matrix. Once the guess is found, it must be refined with a LM algorithm.
To find an homography, a RANSAC estimation must be implemented to have an accurate guess. A Ransac estimation requires a threshold to find inliers/outliers. Instead of giving a hard coded value for the threshold (like 3 in OpenCV), I'm using a technique that finds this threshold to give me an inlier ratio between 0.5 and 0.75.
This procedure gives me a subset of inliers with a mean distance between points about 0.15 pixel with more than 500 points.
At this step, I know that my homographies are well estimated.
After the LM refinement, I have the exact same results as OpenCV, which is nice, it means that my implementation is not so bad after all but I'm still not having the results I'm expecting.

For each view to estimate the homography, a ransac procedure was used to compute it. So I decided to keep only the inliers points for refining the solution. The results are really better now. The results are really close to the one expected from the technical documentation of the camera.
The rms error of the reprojection on each view for the whole points is slightly reduced but the focal length/principal point and the k1/k2 distortion coefficients are correct.

The improvement was made by:
1. Refining the solution on the inliers points and not the whole data set
2. Not using a hard coded value for the distance error for the homography estimation

I'm using OpenCV 2.4.13 on MacOS X.

What do you think about this procedure ?
Repository: javascript
Issue: [Request] use constants for linter error levels
Labels: question

My team has forked this project a couple times because linting rules are mostly 2/error instead of 1/warning, so it obscures genuine errors.

Something like this:

```
<Foo b={} a={} /> // props sorted wrong
```

Should not have the same severity as a critical bug! This adds a ton of mental overhead to every line when red dots are popping up everywhere: "will this code throw an error or is there some minor formatting issue?"

Needing to be so precious with every line slows down development when you may just be testing some additions or wading into third party code. 

Doubly with autofix enabled, Atom currently fixes a ton of formatting inconsistencies on save, I can safely ignore some warnings now.

However, I understand your logic in #853 – when you need to enforce absolute consistency in your team, saying "you can't proceed without fixing this niggle" is important. I would argue that should go in a commit hook or similar, but...

why not use a custom constant to define the error levels? This would allow the linting logic to be more flexible:

`{ rule: airbnb.ERROR }`
Repository: youtube-dl
Issue: MKV thumbnail not correctly embedded
Labels: bug,postprocessors

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.08.13**
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [x] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

When using --embed-thumbnail, it seems that the thumbnail isn't added as an image resource (cover.jpg) to the mkv video file but instead added as a second video stream. Seemingly using the same code as is used for embedding cover art for a mp3. This results in the embedded thumbnail not being displayed and instead no thumbnail or a automatically generated one being shown.

Tested with this video:
https://www.youtube.com/watch?v=k_okcNVZqqI
youtube-dl https://www.youtube.com/watch?v=k_okcNVZqqI --embed-thumbnail
Using youtube-dl 2016.08.13 and ffmpeg-20160815-3282e31-win64-static

MediaInfo, thumbnail embedded with --embed-thumbnail:
[INK DROPS 4K (ULTRA HD)-k_okcNVZqqI.mkv.MediaInfo.txt](https://github.com/rg3/youtube-dl/files/420888/INK.DROPS.4K.ULTRA.HD.-k_okcNVZqqI.mkv.MediaInfo.txt)

MediaInfo, thumbnail embedded with mkvpropedit:
[INK DROPS 4K (ULTRA HD)-k_okcNVZqqI-proper.mkv.MediaInfo.txt](https://github.com/rg3/youtube-dl/files/420889/INK.DROPS.4K.ULTRA.HD.-k_okcNVZqqI-proper.mkv.MediaInfo.txt)

Related to this the request for thumbnail embedding support for webm files when this is fixed. (#10360)
Repository: go
Issue: cmd/compile: move SSA boolean optimizations to generic level
Labels: compiler/runtime

Boolean optimizations were at the arch-specific level, because we had not yet decided that bools will be 0/1 everywhere. Now that that decision has been made, boolean optimizations could be migrated earlier. Filing this issue as a reminder on behalf of @brtzsnr.
Repository: go
Issue: cmd/compile: make SSA IDs stable across passes
Labels: NeedsFix,compiler/runtime

GOSSAFUNC's ssa.html's help text says:

> Values and blocks are highlighted by ID, which may vary across passes. (TODO: Fix this.)

But what is the bug? Maybe this is.

/cc @josharian @randall77
Repository: TypeScript
Issue: Comments on inner properties are stripped
Labels: Suggestion,Help Wanted

TS: 2.0.0

``` ts
// code.ts
/**
 * Some foo
 */
export const foo = {
  /**
   * Some boo
   */
  boo = 0
}
```

expect: 

``` ts
// code.d.ts
/**
 * Some foo
 */
export declare foo: {
  /**
   * Some boo
   */
  boo: number;
}
```

actual:

``` ts
// code.d.ts
/**
 * Some foo
 */
export declare foo: {
  boo: number;
}
```

By the way, is there a way to separately control whether comment should be kept in `*.d.ts` and `*.js`?

Currently when `tsconfig.json/compilerOptions/removeComments = true`, comments are removed from both of them.

Would it be nice to keep the comments in `*.d.ts` but not `*.js`?
Repository: opencv
Issue: boxFilter unexpected behaviour
Labels: RFC

While trying to use boxFilter on floating-point CV_32FC3 images, I noticed a strange behaviour where negative numbers appear.

The following code snippet should reproduce the issue with the image attached:

``` .cpp
cv::Mat testImg = cv::imread("data/castle.jpg");
testImg.convertTo(testImg, CV_32FC3, 1.0 / 255.0);
for (int i = 0; i < testImg.total(); i++) {
    if (testImg.at<cv::Vec3f>(i)[0] < 0 ||
        testImg.at<cv::Vec3f>(i)[1] < 0 ||
        testImg.at<cv::Vec3f>(i)[2] < 0) {
        std::cout << "Before box filter: " << testImg.at<cv::Vec3f>(i) << std::endl;
    }
}
cv::boxFilter(testImg, testImg, -1, cv::Size(3, 3));
for (int i = 0; i < testImg.total(); i++) {
    if (testImg.at<cv::Vec3f>(i)[0] < 0 ||
        testImg.at<cv::Vec3f>(i)[1] < 0 ||
        testImg.at<cv::Vec3f>(i)[2] < 0) {
        std::cout << "After box filter: " << testImg.at<cv::Vec3f>(i) << std::endl;
    }
}
```

![castle](https://cloud.githubusercontent.com/assets/11393167/17730953/6a2230fe-646b-11e6-85b6-3e94a68118a8.jpg)

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->
##### System information (version)

<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->
- OpenCV => 3.1.0
- Operating System / Platform => Windows 10 64-bit
- Compiler => Visual Studio 2013
##### Detailed description

<!-- your description -->
##### Steps to reproduce

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->
Repository: TypeScript
Issue: Trailing trivia removed for some object properties
Labels: Bug,Domain: Comment Emit

**TypeScript Version:**  1.8.x / Playground

**Code**

``` ts
// the export annotations
export function bug() {
    // hello

    // another?

    // return annotation
    return {
        // return object annotation
        outer: {
            // more!
            inner1: { // here too
                // and more

                p1: 'v1', // comment1
                p2: 'v2', // comment2
                p3: 'v3'  // last comment
            } // here?
        } // and here?
    }; // here too?

    // and finally here
}

```

[Playground demo](http://www.typescriptlang.org/play/#src=%2F%2F%20the%20export%20annotations%0Aexport%20function%20bug%28%29%20%7B%0A%09%2F%2F%20hello%0A%09%0A%09%2F%2F%20another%3F%0A%09%0A%09%2F%2F%20return%20annotation%0A%09return%20%7B%0A%09%09%2F%2F%20return%20object%20annotation%0A%09%09outer%3A%20%7B%0A%09%09%09%2F%2F%20more!%0A%09%09%09inner1%3A%20%7B%20%2F%2F%20here%20too%0A%09%09%09%09%2F%2F%20and%20more%0A%09%09%09%09%0A%09%09%09%09p1%3A%20'v1'%2C%20%2F%2F%20comment1%0A%09%09%09%09p2%3A%20'v2'%2C%20%2F%2F%20comment2%0A%09%09%09%09p3%3A%20'v3'%20%20%2F%2F%20last%20comment%0A%09%09%09%7D%20%2F%2F%20here%3F%0A%09%09%7D%20%2F%2F%20and%20here%3F%0A%09%7D%3B%20%2F%2F%20here%20too%3F%0A%09%0A%09%2F%2F%20and%20finally%20here%0A%7D)

**Expected behavior:**
All comments preserved

**Actual behavior:** 
`comment1` and `comment2` are removed
Repository: vscode
Issue: Glob matching should be case insensitive
Labels: feature-request,search,file-glob

- VSCode Version: 1.4.0
- OS Version: Win10 1511

Steps to Reproduce:
1. using VSCode, open a directory stored in an NTFS volume, which has files named FooContainer.cs
2. press CTRL+SHIFT+F to invoke Find in Files
3. press "..." to show 'files to include'
4. enter "*_/_container.cs"
5. search for something that is known to exist in the file.
6. results: nothing is found
7. replace 'files to include' with "*_/_Container.cs" (only change is the upper case C instead of lower case)
8. search again, this time results are found as expected.

Since Windows NTFS is not a case-sensitive file system, the expected results is that I can search in files using any case in the 'files to include'/'files to exclude'.
Repository: youtube-dl
Issue: Windows 10 x64 - Fatal Python error: Py_Initialize: unable to load the file system codec
Labels: external-bugs

### Make sure you are using the _latest_ version: run `youtube-dl --version` and ensure your version is _2016.08.17_. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.08.17**
### Before submitting an _issue_ make sure you have:
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [x] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---
### If the purpose of this _issue_ is a _bug report_, _site support request_ or you are not completely sure provide the full verbose output as follows:

Add `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):

```
C:\path\to\youtube-dl>youtube-dl.exe -v
Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x00003a38 (most recent call first):
<end of log>
```

---
### Description of your _issue_, suggested solution and other information

Similar issue:
I found #10053, which reports the same problem, but was closed because the user had placed it in `C:\Windows\System32`. I did _not_ place mine in that location.

Additional notes:
- I downloaded the executable file just prior to executing, so it is the latest version
- Windows 10 x64 machine
- Microsoft Visual C++ 2010 redistributable package is installed
- The machine was recently upgraded to Windows 10, and prior to the upgrade, youtube-dl functioned just fine
Repository: TypeScript
Issue: probable bug in typeof type guard
Labels: Bug

**TypeScript Version:**  1.8.0

**Code**

``` ts
const numbers: {[key: string]: number} = {a: 1, b: 2};

const mixed: {[key: string]: number|string} = {a: 1, b: 'two'};

function test(something: {[key: string]: number|string}) {
  Object.keys(something).forEach(k => {
        if (typeof something[k] === 'number') {
            Math.floor(something[k]);
        } else {
            something[k].toLowerCase();
        }
  });
}

test(numbers);
```

Link: https://www.typescriptlang.org/play/#src=const%20numbers%3A%20%7B%5Bkey%3A%20string%5D%3A%20number%7D%20%3D%20%7Ba%3A%201%2C%20b%3A%202%7D%3B%0D%0A%0D%0Aconst%20mixed%3A%20%7B%5Bkey%3A%20string%5D%3A%20number%7Cstring%7D%20%3D%20%7Ba%3A%201%2C%20b%3A%20'two'%7D%3B%0D%0A%0D%0Afunction%20test(something%3A%20%7B%5Bkey%3A%20string%5D%3A%20number%7Cstring%7D)%20%7B%0D%0A%20%20Object.keys(something).forEach(k%20%3D%3E%20%7B%0D%0A%20%20%20%20%20%20%20%20if%20(typeof%20something%5Bk%5D%20%3D%3D%3D%20'number')%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20Math.floor(something%5Bk%5D)%3B%0D%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20something%5Bk%5D.toLowerCase()%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%7D)%3B%0D%0A%7D%0D%0A%0D%0Atest(numbers)%3B

**Expected behavior:**
Type guard would apply to `something[k]`.

**Actual behavior:** 
Type guard does not get applied to `something[k]`.
Repository: vscode
Issue: Support Windows Narrator for screen reading
Labels: feature-request,upstream,accessibility,electron,a11ymas

- VSCode Version: 1.4.0
- OS Version: Windows

Hi,
I'm trying to test Accessibility on VSCode. I found that VsCode doesn't support Windows Narrator. However, I was able to use NVDA tool. It works perfectly fine.

Is this the known issue ? It's working fine on mac os with voiceover utility
Repository: opencv
Issue: Bug: Different round/cast orders in implicit Mat type conversion, depending on seemingly unrelated compiler flags
Labels: category: core,affected: 3.4,RFC

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->
##### System information (version)

<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->
- OpenCV => 3.0 (tested on the 3.0.0 tag and master) 
- Operating System / Platform => OSX10.11 and Ubuntu16.04
- Compiler => clang-703.0.29 and gcc-5.4.0
##### Detailed description

<!-- your description -->

It seems that there is some poorly defined behaviour when a type conversion occurs in a `MatExpr`. Sometimes the cast (`convertTo`) happens before the multiplication operation (and therefore no precision loss because of rounding) and sometimes the cast happens after.

So `cv::Mat_<float> = cv::Mat_<uint16_t> * float` (pseudocode) produces different results depending on seemingly unrelated compiler flags in the target app (i.e. OpenCV compilation is unchanged for the two different results).
##### Steps to reproduce

Compile opencv fresh from master.

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->

**reproduce_conversion_fail.cpp**:

```
#include <iostream>
#include <string>

#include <opencv2/opencv.hpp>

int main()
{
    cv::Mat_<uint16_t> imu = cv::Mat_<uint16_t>::ones(10, 10);

    cv::Mat_<uint16_t> imu2 = imu * 0.001f;
    imu2 *= 1000.f;

    cv::Mat_<float> imf = imu * 0.001f;
    imf *= 1000.f;

    std::cout << "mean uint16_t: " << cv::mean(imu) << std::end;
    std::cout << "mean uint16_t (autorounded): " << cv::mean(imu2) << std::end;
    std::cout << "mean float: " << cv::mean(imf) << std::endl;
}
```

`g++ reproduce_conversion_fail.cpp -I../src/opencv/install/include -L../src/opencv/install/lib -lopencv_core -lopencv_imgcodecs -std=c++11` results in:

```
mean uint16_t: [1, 0, 0, 0]
mean uint16_t (autorounded): [0, 0, 0, 0]
mean float: [0, 0, 0, 0]
```

or
`g++ reproduce_conversion_fail.cpp -I../src/opencv/install/include -L../src/opencv/install/lib -lopencv_core -lopencv_imgcodecs` results in

```
mean uint16_t: [1, 0, 0, 0]
mean uint16_t (autorounded): [0, 0, 0, 0]
mean float: [1, 0, 0, 0]
```

Compiling opencv with `WITH_IPP=OFF` removes this behaviour. Not sure if the error is in the IPP-part of the code or if it just cannot be triggered with the `c++11` flag when IPP is enabled.
Repository: youtube-dl
Issue: Site support request [stopgame.ru]
Labels: site-support-request

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.08.19**
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [x] Site support request (request for adding support for a new site)

```
>youtube-dl -vF http://stopgame.ru/gamemovie/show/390
[debug] System config: []
[debug] User config: [u'--sub-lang', u'ru,en']
[debug] Command-line args: [u'-vF', u'http://stopgame.ru/gamemovie/show/390']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.08.19
[debug] Python version 2.7.10 - Linux-4.1.30-gentoo-nvidia-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-2.2
[debug] exe versions: ffmpeg 3.1.2, ffprobe 3.1.2
[debug] Proxy map: {}
[generic] 390: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 390: Downloading webpage
[generic] 390: Extracting information
ERROR: Unsupported URL: http://stopgame.ru/gamemovie/show/390
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/generic.py", line 1633, in _real_extract
    doc = compat_etree_fromstring(webpage.encode('utf-8'))
  File "/usr/lib64/python2.7/site-packages/youtube_dl/compat.py", line 2525, in compat_etree_fromstring
    doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory)))
  File "/usr/lib64/python2.7/site-packages/youtube_dl/compat.py", line 2514, in _XML
    parser.feed(text)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: duplicate attribute: line 2, column 37
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 691, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/common.py", line 347, in extract
    return self._real_extract(url)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/extractor/generic.py", line 2377, in _real_extract
    raise UnsupportedError(url)
UnsupportedError: Unsupported URL: http://stopgame.ru/gamemovie/show/390
```
- Single video: http://stopgame.ru/gamemovie/show/390
- Single video: http://stopgame.ru/machinima/show/536
- Playlist: http://stopgame.ru/gamemovie/genre/vghs
- Playlist: http://stopgame.ru/machinima/genre/red_vs_blue
Repository: vscode
Issue: Improve editor.trimAutoWhitespace or cursor navigation
Labels: feature-request,editor-core

Loosing indent position all the time when navigating code.  You loose code indent position with both navigating with the mouse or arrow keys (sick of pressing tab to get alignment back or delete then enter to get a new line with the correct indentation, or just start typing from the wrong position and use code format shortcut after entering something at a different location.
- VSCode Version:
  1.4.0
- OS Version:
  Win10

Steps to Reproduce:
Edit anything with line gaps between code
Repository: rust
Issue: Go over all libstd traits and see which of them !/TyNever should implement
Labels: T-libs-api,C-feature-accepted,F-never_type

E.g. `!` should implement `Default`.
Repository: youtube-dl
Issue: Download videos from Plex's servers?
Labels: site-support-request,account-needed

Is it possible?

Thank you in advance. :)
Repository: awesome-mac
Issue: Please add LittleIpsum
Labels: vote

- LittleIpsum on the Mac App Store || https://itunes.apple.com/us/app/littleipsum/id405772121?mt=12

"The best Latin text generator for OS X. Incredibly quick and lightweight."
Repository: awesome-mac
Issue: Please add CopyClip
Labels: addition

- CopyClip - Clipboard History Manager on the Mac App Store || https://itunes.apple.com/us/app/copyclip-clipboard-history/id595191960?mt=12

"CopyClip is the simplest and most efficient clipboard manager for your Mac. Running discreetly from your menu bar, this app stores all that you have copied or cut in the past, allowing you to quickly find that snippet of text you've been looking for."
Repository: rust
Issue: Implementation of Index<Foo> prevents indexing arrays by other index types
Labels: A-type-system,T-compiler,C-bug,A-array,T-types

``` rust
use std::ops::Index;

enum Foo {
    Zero,
    One,
    Two,
}

impl Index<Foo> for [u8; 3] {
    type Output = u8;

    fn index(&self, index: Foo) -> &u8 {
        unsafe { self.get_unchecked(index as usize) }
    }
}

fn main() {
    let arr: [u8; 3] = [0, 1, 2];

    // OK:
    let _ = arr[Foo::Two];

    // Error:
    let _ = arr[2usize];
    //          ^^^^^^ expected enum `Foo`, found `usize`

    // Error:
    let _ = &arr[0usize..2];
    //           ^^^^^^^^^ expected enum `Foo`, found struct `std::ops::Range<usize>`

    // Error:
    let _ = &arr[..];
    //           ^^ expected enum `Foo`, found struct `std::ops::RangeFull`
}
```
Repository: TypeScript
Issue: Give a better error message when an import isn't found but a namespace of the same name exists
Labels: Bug,Help Wanted,Effort: Moderate,Domain: Error Messages

See #10463.

`foo.d.ts`

``` ts
declare module foo {
    // ...
}
```

`bar.ts`

``` ts
import foo = require("foo");
```

`"foo"` won't be found, but if the compiler can resolve an identifier named `foo` to a namespace that uses the `declare module` syntax, we should probably give an error like

```
Cannot find module 'foo'.
  A legacy-style namespace with the same name was found.
    Try changing the declaration to use quotes (e.g. 'declare module "foo"').
```