Last active
July 9, 2018 04:13
-
-
Save leebyron/d94b159284644575906ac17cdc3e34a9 to your computer and use it in GitHub Desktop.
flow-implements-bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @flow */ | |
interface SomeInterface { | |
method(): string | |
} | |
export class SomeClass implements SomeInterface { | |
static async load(): Promise<SomeClass> { | |
// There's no error here, as expected. | |
return new SomeClass() | |
} | |
method(): string { | |
return 'wow' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"flow-bin": "0.76.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @flow */ | |
import { type SomeInterface } from './SomeInterface' | |
export class SomeClass implements SomeInterface { | |
static async load(): Promise<SomeClass> { | |
// This is returning an unexpected error. The only difference between this | |
// And BothInSameFile.js is that this has imported the interface from | |
// another file. | |
return new SomeClass() | |
} | |
method(): string { | |
return 'wow' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @flow */ | |
export interface SomeInterface { | |
method(): string | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a --traces view: