fable-compiler / fable-react-native

Fable bindings and helpers for React Native projects
Apache License 2.0
49 stars 11 forks source link

Error: Cannot infer key and value ... #40

Closed iyegoroff closed 5 years ago

iyegoroff commented 5 years ago

I'm receiving this error only on Android in this project. It is triggered by Padding (dip 123.) line here. Also I can't reproduce it in a simple example, because if I comment lines with CombinedFilteredImage.Message the error will disappear.

screenshot_20180920-013846

looks related https://github.com/fable-compiler/Fable/issues/1290

alfonsogarciacaro commented 5 years ago

Hmm, strange. I'd like to test this with Fable 2 to see if it's still happening...

iyegoroff commented 5 years ago

Looks like some JavaScriptCore bug led to this behavior. I didn't find any info about it, but this.tag in the following snippet was set to undefined right inside the constructor in certain situations:

  setType("Fable.Helpers.ReactNative.Props.TransformsStyle", TransformsStyle);
  const FlexStyle = __exports.FlexStyle = class FlexStyle {
    constructor(tag, data) {
      this.tag = tag | 0;
      this.data = data;
    }
    ...

After replacing original JSC with this one I didn't receive this error anymore.