question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failing to compile in common scenario calling array member

See original GitHub issue

Hi,

It looks like whenever a spec has an operation which returns a type containing an array of custom types, the type provider fails to compile at the point of calling that array member. Minimal repro at https://github.com/adamjones1/swagger-provider-error. (It compiles fine if line 9 of Program.fs calling .Items is commented out.) This is using version 0.8.2, though I only encountered the issue this week curiously - possibly the spec I was using changed in that time.

The reported error is: “FS3033 The type provider ‘SwaggerProvider.SwaggerTypeProvider’ reported an error in the context of provided type ‘SwaggerProvider.MyTypeProvider+Response’, member ‘get_Items’. The error: The operation ‘Namespace’ on item ‘Item[]’ should not be called on provided type, member or parameter”

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
adamjones1commented, Feb 28, 2019

Ah, apologies I wasn’t aware the API had changed in the dev package - after updating the client as per your screenshot above the 0.10.0-beta05 one worked for me.

0reactions
sergey-tihoncommented, Nov 6, 2019

Looks fine with latest released beta. Please reopen if you can reproduce image

Read more comments on GitHub >

github_iconTop Results From Across the Web

c++ - Accessing an array out of bounds gives no error, why?
The language simply says what should happen if you access the elements within the bounds of an array. It is left undefined what...
Read more >
Build completed with a result of 'Failed'
Hi guys, I have a weird problem with Unity. Sometimes my android build fails with this: Error building Player: 2 errors Build completed...
Read more >
How to Handle the Incompatible Types Error in Java
The Java incompatible types error happens when a value assigned to a variable or returned by a method is incompatible with the one...
Read more >
Array in C: Definition, Advantages, Declare, Initialize and ...
Array in C can be defined as a method of clubbing multiple entities of similar type into a larger group. These entities or...
Read more >
The "Cannot find symbol" Compilation Error
With this setup, the compiler will give a “cannot find symbol” error for generateId on line 7 of the Article snippet. This is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found