mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
This adds Alert annotations for alerts that seem intentional by the test but has not been annotated with 'NOT OK', or the comment was in the wrong place. In a few cases I included 'Source' expectations to make it easier to see what happened. Other 'Source' expectations will be added in bulk a later commit.
29 lines
498 B
TypeScript
29 lines
498 B
TypeScript
(function(){
|
|
var o1: { p: int, q: int } = { p: 42, q: 42 };
|
|
o1.q;
|
|
|
|
var o2 = <{ p: int, q: int }>{ p: 42, q: 42 };
|
|
o2.q;
|
|
|
|
var o3: { p: int, q: int } = f();
|
|
o3 = o3 || { p: 42, q: 42 };
|
|
o3.q;
|
|
|
|
});
|
|
|
|
class C {
|
|
private o: { p: int, q: int };
|
|
|
|
constructor() {
|
|
this.o = { p: 42, q: 42 };
|
|
this.o.q;
|
|
}
|
|
}
|
|
|
|
(function(){
|
|
var o1: any = { p: 42, q: 42 }; // $ Alert
|
|
o1.q;
|
|
var o2: any = { p: 42, q: 42 };
|
|
var o3: { p: int, q: int } = o2;
|
|
})
|