Skip to content

Instantly share code, notes, and snippets.

@cormojs
Created June 23, 2015 14:32
Show Gist options
  • Save cormojs/a06a109ab0798eb01d1c to your computer and use it in GitHub Desktop.
Save cormojs/a06a109ab0798eb01d1c to your computer and use it in GitHub Desktop.
error: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved.
type Foo() =
member __.bar = "bar"
type Bar() as self =
let foo = Foo()
do
printf "%A" foo.bar
printf "%A" self.Foo.bar
member __.Foo = foo
@cormojs
Copy link
Author

cormojs commented Jun 23, 2015

8行目で「Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved.」というエラーが出る。Fooに型ヒントを付けるとエラーが消える。解せない。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment