Bug: invalid underlying type name - codefluent

If you change the 'Underlying type name' property of an enumeration in something that does not exist (typo). The application throws an 'CF0230: Invalid enumeration type 'System.Int32System.Int16'.' Error. Which is fine.
However, there is no way to change the type afterwards. I had to edit the CFP manually to correct the error.

Related

Why getting The method 'contains' isn't defined for the type 'String'. flutter

I am using contains method for a string in dart but getting an error like this.
can anyone tell me what is wrong with using .contains for a string in dart
This is my code
String isPdf = "https://www.africau.edu/images/default/sample.pdf";
isPdf.contains("pdf");
Error occurs
The method 'contains' isn't defined for the type 'String'.
Try correcting the name to the name of an existing method, or defining a method named 'contains'.
In vscode quickfix tells me that
change the 'contains' method to 'oscontains'.

Cannot convert type value of type Observable<Store> to expected argument type Observable<Store?>

I'm getting an error which says the following:
Cannot convert value of type 'Observable<Store>' to expected argument type 'Observable<Store?>
So the method I'm calling StoreMock(state: stateSubject, store: storeSubject) seems to expect an optional for the observable storeSubject. But I'm not sure why it should matter if I pass in a non-optional. Shouldn't it be fine as it will always be there.
Any ideas?
You have to wrap the object into an Optional:
StoreMock(state: stateSubject, store: storeSubject.map(Optional.some))
Just one call will fix this.

"Extraneous Property" and "Parser Mismatched Metadata" errors in the Facebook debug validator

I am working on refactoring of one older page and I have problem with Facebook debug validator.
Extraneous Property
Objects of this type do not allow properties named 'twitter:card'.
Extraneous Property
Objects of this type do not allow properties named 'twitter:title'.
Extraneous Property
Objects of this type do not allow properties named 'twitter:description'.
Parser Mismatched Metadata
The parser's result for this metadata did not match the input metadata. Likely, this was caused by the data being ordered in an unexpected way, multiple values being given for a property only expecting a single value, or property values for a given property being mismatched. Here are the input properties that were not seen in the parsed result: 'twitter:card, twitter:title, twitter:description'
Should these tags has any importance? Or how I can repair it?

<unknown>:0: error: type 'Key' constrained to non-protocol type 'String'

Migrating to Swift 3 from 2.3 and am running into this issue. The error is traceable to a view controller.
I do not see any extensions/protocols which would require a 'Key' constrained to 'String'.
I've tried to comment out code that might be causing the error, and have had strange results - ie removing an empty viewDidLoad() made the error appear in another class.
I'll update the thread if I make progress.
Key is a type inside a structure maybe a struct/class like Dictionary.
Use AnyHashable as Key to replace String if in Dictionary.

Strongly typed ViewModel contains unexpected null value

I have a case that is very similar to this, but following the advice in the answers does not solve my problem.
I have a ViewModel in an MVC 2 application that contains another class. I have a controller that contains a strongly typed create method:
[Authorize]
[HttpPost]
public ActionResult Create(AIViewModel ai)
{
}
When I look at the ModelState when I enter the Create method, the data indicates that the simple properties that are present within the AIViewModel class are bound correctly, while the complex type that is in there fails with the following error message:
"The parameter conversion from type 'System.String' to type 'xyz' failed because no type converter can convert between these types."
If I look at the value that it tries to bind, it has indeed the System.String type and value "Create". Anybody has a clue on what I could be doing wrong?
UPDATE: I have found the problem: The property is called Action, which somehow fools the the modelbinder. Renaming the property solved the issue.