|
| 1 | +=== tests/cases/compiler/intersectionTypeInference1.ts === |
| 2 | +// Repro from #8801 |
| 3 | + |
| 4 | +function alert(s: string) {} |
| 5 | +>alert : Symbol(alert, Decl(intersectionTypeInference1.ts, 0, 0)) |
| 6 | +>s : Symbol(s, Decl(intersectionTypeInference1.ts, 2, 15)) |
| 7 | + |
| 8 | +const parameterFn = (props:{store:string}) => alert(props.store) |
| 9 | +>parameterFn : Symbol(parameterFn, Decl(intersectionTypeInference1.ts, 4, 5)) |
| 10 | +>props : Symbol(props, Decl(intersectionTypeInference1.ts, 4, 21)) |
| 11 | +>store : Symbol(store, Decl(intersectionTypeInference1.ts, 4, 28)) |
| 12 | +>alert : Symbol(alert, Decl(intersectionTypeInference1.ts, 0, 0)) |
| 13 | +>props.store : Symbol(store, Decl(intersectionTypeInference1.ts, 4, 28)) |
| 14 | +>props : Symbol(props, Decl(intersectionTypeInference1.ts, 4, 21)) |
| 15 | +>store : Symbol(store, Decl(intersectionTypeInference1.ts, 4, 28)) |
| 16 | + |
| 17 | +const brokenFunction = <OwnProps>(f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o |
| 18 | +>brokenFunction : Symbol(brokenFunction, Decl(intersectionTypeInference1.ts, 5, 5)) |
| 19 | +>OwnProps : Symbol(OwnProps, Decl(intersectionTypeInference1.ts, 5, 24)) |
| 20 | +>f : Symbol(f, Decl(intersectionTypeInference1.ts, 5, 34)) |
| 21 | +>p : Symbol(p, Decl(intersectionTypeInference1.ts, 5, 38)) |
| 22 | +>dispatch : Symbol(dispatch, Decl(intersectionTypeInference1.ts, 5, 42)) |
| 23 | +>OwnProps : Symbol(OwnProps, Decl(intersectionTypeInference1.ts, 5, 24)) |
| 24 | +>o : Symbol(o, Decl(intersectionTypeInference1.ts, 5, 85)) |
| 25 | +>OwnProps : Symbol(OwnProps, Decl(intersectionTypeInference1.ts, 5, 24)) |
| 26 | +>o : Symbol(o, Decl(intersectionTypeInference1.ts, 5, 85)) |
| 27 | + |
| 28 | +export const Form3 = brokenFunction(parameterFn)({store: "hello"}) |
| 29 | +>Form3 : Symbol(Form3, Decl(intersectionTypeInference1.ts, 6, 12)) |
| 30 | +>brokenFunction : Symbol(brokenFunction, Decl(intersectionTypeInference1.ts, 5, 5)) |
| 31 | +>parameterFn : Symbol(parameterFn, Decl(intersectionTypeInference1.ts, 4, 5)) |
| 32 | +>store : Symbol(store, Decl(intersectionTypeInference1.ts, 6, 50)) |
| 33 | + |
0 commit comments