Damian Gryski
|
3aa8c8e0d1
|
reflect: fix typo in unit test
|
2023-03-25 22:32:29 +01:00 |
|
Damian Gryski
|
6cb7f29d9b
|
reflect: add tests for map interface lookup fixes
|
2023-03-25 22:32:29 +01:00 |
|
Damian Gryski
|
bedd27b20e
|
reflect: handle map-keys-as-interfaces for MapIter()
|
2023-03-25 22:32:29 +01:00 |
|
Damian Gryski
|
3612b7749e
|
reflect: uncomment all(?) the tests that pass
|
2023-03-25 13:57:00 +01:00 |
|
Damian Gryski
|
45c916f5c0
|
reflect: rename tests in value_test to avoid conflicts upstream tests
|
2023-03-25 13:57:00 +01:00 |
|
Damian Gryski
|
688a5dbf8d
|
reflct: reenable DeepEqual tests
|
2023-03-25 13:57:00 +01:00 |
|
Damian Gryski
|
35dcf135c0
|
reflect: comment out all tests but keep imports
|
2023-03-25 13:57:00 +01:00 |
|
Damian Gryski
|
c482d65397
|
reflect: replace all_test with copy from upstream
|
2023-03-25 13:57:00 +01:00 |
|
Damian Gryski
|
17f5fb1071
|
reflect; SetLen() requires an addressable value
|
2023-03-21 20:53:37 +01:00 |
|
Damian Gryski
|
4d43df75d5
|
reflect: fix some vet issues
|
2023-03-21 20:53:37 +01:00 |
|
Damian Gryski
|
57b0c21492
|
reflect: tweak Type.String() for interfaces to make encoding/xml happy
|
2023-03-19 13:50:38 -07:00 |
|
Damian Gryski
|
8fb5877d9e
|
reflect: fix isBinary() for float types
|
2023-03-19 13:49:55 -07:00 |
|
Damian Gryski
|
6fbe6fa2ae
|
reflect: tweak Type.String() to match what encoding/json expects for empty structs
|
2023-03-19 20:37:57 +01:00 |
|
Damian Gryski
|
24b4dc31a4
|
reflect: stub MapOf()
|
2023-03-19 19:12:34 +01:00 |
|
Damian Gryski
|
229f479a7d
|
reflect: make sure pointerTo() works for named types
|
2023-03-19 17:45:43 +01:00 |
|
Damian Gryski
|
876f08979f
|
compiler,reflect: sort out pkg path vs pkg name for named types
|
2023-03-19 17:45:43 +01:00 |
|
Damian Gryski
|
f2cc98caa5
|
compiler,reflect: adjust struct layout for type info
|
2023-03-19 17:45:43 +01:00 |
|
Damian Gryski
|
6a685b2a8d
|
reflect: add test for Type.NumMethod()
|
2023-03-19 17:45:43 +01:00 |
|
Damian Gryski
|
569817a514
|
refect: Type.String() should use a shortened package name
|
2023-03-19 17:45:43 +01:00 |
|
Damian Gryski
|
7a96f0f609
|
compiler,reflect: add reflect.Type.NumMethods()
|
2023-03-19 17:45:43 +01:00 |
|
Damian Gryski
|
344e493ac8
|
compiler,reflect: fix pkgpath for struct fields
|
2023-03-15 21:53:57 +01:00 |
|
Damian Gryski
|
1626b50457
|
reflect: set PkgPath in StructField
|
2023-03-15 21:53:57 +01:00 |
|
Damian Gryski
|
93fb897feb
|
compiler, reflect: properly handle embedded structs
|
2023-03-15 21:53:57 +01:00 |
|
Damian Gryski
|
15109a2924
|
reflect: disable visiblefields test for FieldByIndexErr
|
2023-03-15 21:53:57 +01:00 |
|
Damian Gryski
|
d9c6f7c11f
|
reflect: import visiblefields code and tests from upstream
|
2023-03-15 21:53:57 +01:00 |
|
Damian Gryski
|
fa4f361ca7
|
reflect: add FieldByName(), and FieldByIndex()
|
2023-03-15 21:53:57 +01:00 |
|
Damian Gryski
|
9f02340a26
|
reflect: fix Type.Name to return empty string for non-named types
// Name returns the type's name within its package for a defined type.
// For other (non-defined) types it returns the empty string.
|
2023-03-15 13:14:21 -07:00 |
|
Damian Gryski
|
c6728643e6
|
reflect: loosen unaddressable array rules for Copy()
|
2023-03-15 10:49:08 -07:00 |
|
Damian Gryski
|
e849901ad6
|
Update src/reflect/value.go
Co-authored-by: Ayke <aykevanlaethem@gmail.com>
|
2023-03-15 10:06:19 -07:00 |
|
Damian Gryski
|
91d6ca057c
|
reflect: add SetBytes()
|
2023-03-15 10:06:19 -07:00 |
|
Damian Gryski
|
0da97e2427
|
reflect: fix IsNil() for interfaces
|
2023-03-15 16:23:52 +01:00 |
|
Damian Gryski
|
ac36f232bc
|
reflect: MapIter.Next() needs to allocate new keys/values every time
|
2023-03-15 15:17:16 +01:00 |
|
Damian Gryski
|
94a54bc105
|
reflect: add UnsafePointer() for Func types
|
2023-03-15 15:08:26 +01:00 |
|
Damian Gryski
|
b044d27dff
|
reflect: move StructField.Anonymous field to match upstream location
|
2023-03-15 00:13:08 +01:00 |
|
Damian Gryski
|
6768af91e7
|
reflect: TypeOf(nil) should be nil
|
2023-03-14 23:58:27 +01:00 |
|
Damian Gryski
|
a366c014c7
|
reflect: call decomposeInterface() directly in TypeOf()
|
2023-03-14 09:53:45 -07:00 |
|
Damian Gryski
|
584a2718d0
|
reflect: add type check to Value.Field()
|
2023-03-14 09:53:00 -07:00 |
|
Damian Gryski
|
069c397975
|
reflect: fix off-by-one in Zero sizing
Without this, pointers wouldn't be set to nil. Add some tests.
|
2023-03-14 09:42:51 -07:00 |
|
Damian Gryski
|
e0aee1f23c
|
reflect: Type.AssignableTo(): you can assign anything to interface{}
|
2023-03-14 17:07:23 +01:00 |
|
Damian Gryski
|
ad9f790dfc
|
reflect: set Index field in Field()
|
2023-03-14 17:04:24 +01:00 |
|
Damian Gryski
|
04412cba0e
|
reflect: add stub for StructOf()
|
2023-03-14 16:54:44 +01:00 |
|
Damian Gryski
|
3b2763896f
|
reflect: add stubs for Method(), CanConvert(), ArrayOf()
|
2023-03-14 16:54:44 +01:00 |
|
Damian Gryski
|
fb394c7685
|
reflect: add UnsafeAddr()
|
2023-03-14 16:53:57 +01:00 |
|
Damian Gryski
|
a52cad3825
|
reflect: fix Addr() indirect value/flags and add tests.
|
2023-03-14 16:49:05 +01:00 |
|
Damian Gryski
|
69e5c5088d
|
reflect: add support for remaining map types
|
2023-03-10 16:28:22 -08:00 |
|
Damian Gryski
|
6a45b73fcb
|
compiler, reflect: replace package and name length with null-byte termination
|
2023-03-08 09:38:49 -08:00 |
|
Damian Gryski
|
2de64d3f4e
|
compiler, reflect: add Type.PkgPath
|
2023-03-08 09:38:49 -08:00 |
|
Damian Gryski
|
2a821d2a66
|
reflect: improve Value.String()
|
2023-03-08 09:38:49 -08:00 |
|
Damian Gryski
|
90af41d089
|
reflect: add Type.String()
|
2023-03-08 09:38:49 -08:00 |
|
Damian Gryski
|
7654d86d2c
|
compiler, reflect: add support for named types
|
2023-03-08 09:38:49 -08:00 |
|