Commit 3993863
CLJS-1477: Do not attempt to resolve "native" type symbols
- The analyzer tags expressions with "native" JavaScript types with
unqualified symbols (e.g., `'string`, `'array`).
- When the compiler encounters a protocol method invocation, it
attempts to resolve the first argument's type tag to locate the
protocol implementation. This does not behave as expected for these
native types (see also `cljs.core/base-type`):
- `clj-nil`
- `number`
- `string`
- `boolean`
- `function`
- `object`
- `array`
- This could similarly affect other type tags:
- `any`
- `clj`
- `clj-or-nil`
- `seq`
- `not-native`
- `long`
- `double`
Add tests demonstrating unexpected `undeclared Var` warning1 parent d63c223 commit 3993863
File tree
2 files changed
+47
-2
lines changed- src
- main/clojure/cljs
- test/clojure/cljs
2 files changed
+47
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
933 | | - | |
| 933 | + | |
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
90 | 135 | | |
91 | 136 | | |
92 | 137 | | |
| |||
0 commit comments