File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 2928
2928
(vary-meta (normalize-js-tag target-tag)
2929
2929
update-in [:prefix ] (fnil conj '[Object]) prop))
2930
2930
nil )]
2931
- (when (not (string/starts-with? (str prop) " cljs$" ))
2931
+ (when (and (not= 'constructor prop)
2932
+ (not (string/starts-with? (str prop) " cljs$" )))
2932
2933
; ; Adding to Object
2933
2934
(when (= 'Object (first (-> tag meta :prefix )))
2934
2935
(warning :infer-warning env
Original file line number Diff line number Diff line change 1819
1819
(.. ~other ~(to-property field))))
1820
1820
base-fields)
1821
1821
(= (.-__extmap ~this)
1822
- (.-__extmap ~other)))))
1822
+ (.-__extmap ~( with-meta other { :tag tagname}) )))))
1823
1823
'IMeta
1824
1824
`(~'-meta [this#] ~'__meta)
1825
1825
'IWithMeta
Original file line number Diff line number Diff line change 1076
1076
:warnings ws
1077
1077
:warn false })]
1078
1078
(is (= (unsplit-lines [" Object.Component;" ]) res))))
1079
+
1080
+ (deftest test-cljs-2767-deftype-defrecord
1081
+ (let [ws (atom [])
1082
+ res (infer-test-helper
1083
+ {:forms '[(ns cjls-2767.core )
1084
+ (defrecord Foo [])]
1085
+ :externs [" src/test/externs/test.js" ]
1086
+ :warnings ws
1087
+ :with-core? true })]
1088
+ (is (empty? @ws)))
1089
+ (let [ws (atom [])
1090
+ res (infer-test-helper
1091
+ {:forms '[(ns cjls-2767.core )
1092
+ (deftype Foo [])]
1093
+ :externs [" src/test/externs/test.js" ]
1094
+ :warnings ws
1095
+ :with-core? true })]
1096
+ (is (empty? @ws))))
You can’t perform that action at this time.
0 commit comments