Skip to content

Instantly share code, notes, and snippets.

@dottorblaster
Created August 30, 2022 13:00
Show Gist options
  • Save dottorblaster/f56ad7b579a9c045f19e54373e3f5166 to your computer and use it in GitHub Desktop.
Save dottorblaster/f56ad7b579a9c045f19e54373e3f5166 to your computer and use it in GitHub Desktop.
module 'Elixir.PolymorphicEmbedBug' ['__changeset__'/0,
'__info__'/1,
'__schema__'/1,
'__schema__'/2,
'__struct__'/0,
'__struct__'/1,
'changeset'/2,
'module_info'/0,
'module_info'/1]
attributes [%% Line 30
'file' =
%% Line 30
[{[108|[105|[98|[47|[112|[111|[108|[121|[109|[111|[114|[112|[104|[105|[99|[95|[101|[109|[98|[101|[100|[95|[98|[117|[103|[46|[101|[120]]]]]]]]]]]]]]]]]]]]]]]]]]]],30}],
%% Line 30
'compile' =
%% Line 30
['no_auto_import'],
%% Line 30
'spec' =
%% Line 30
[{{'__info__',1},[{'type',30,'fun',[{'type',30,'product',[{'type',30,'union',[{'atom',30,'attributes'}|[{'atom',30,'compile'}|[{'atom',30,'functions'}|[{'atom',30,'macros'}|[{'atom',30,'md5'}|[{'atom',30,'exports_md5'}|[{'atom',30,'module'}|[{'atom',30,'deprecated'}]]]]]]]]}]}|[{'type',30,'any',[]}]]}]}]]
'__info__'/1 =
( fun (_0) ->
( case ( _0
-| [{'function',{'__info__',1}}] ) of
<'module'> when 'true' ->
'Elixir.PolymorphicEmbedBug'
<'functions'> when 'true' ->
[{'__changeset__',0}|[{'__schema__',1}|[{'__schema__',2}|[{'__struct__',0}|[{'__struct__',1}|[{'changeset',2}]]]]]]
<'macros'> when 'true' ->
[]
<'exports_md5'> when 'true' ->
#{#<82>(8,1,'integer',['unsigned'|['big']]),
#<112>(8,1,'integer',['unsigned'|['big']]),
#<162>(8,1,'integer',['unsigned'|['big']]),
#<103>(8,1,'integer',['unsigned'|['big']]),
#<77>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']]),
#<241>(8,1,'integer',['unsigned'|['big']]),
#<220>(8,1,'integer',['unsigned'|['big']]),
#<12>(8,1,'integer',['unsigned'|['big']]),
#<3>(8,1,'integer',['unsigned'|['big']]),
#<126>(8,1,'integer',['unsigned'|['big']]),
#<165>(8,1,'integer',['unsigned'|['big']]),
#<98>(8,1,'integer',['unsigned'|['big']]),
#<174>(8,1,'integer',['unsigned'|['big']]),
#<238>(8,1,'integer',['unsigned'|['big']]),
#<26>(8,1,'integer',['unsigned'|['big']])}#
<Key = 'attributes'> when 'true' ->
call 'erlang':'get_module_info'
('Elixir.PolymorphicEmbedBug', Key)
<Key = 'compile'> when 'true' ->
call 'erlang':'get_module_info'
('Elixir.PolymorphicEmbedBug', Key)
<Key = 'md5'> when 'true' ->
call 'erlang':'get_module_info'
('Elixir.PolymorphicEmbedBug', Key)
<'deprecated'> when 'true' ->
[]
( <_1> when 'true' ->
( primop 'match_fail'
(( {'function_clause',_1}
-| [{'function',{'__info__',1}}] ))
-| [{'function',{'__info__',1}}] )
-| ['compiler_generated'] )
end
-| [{'function',{'__info__',1}}] )
-| [{'function',{'__info__',1}}] )
'__changeset__'/0 =
%% Line 38
( fun () ->
~{'channel'=>{'parameterized','Elixir.PolymorphicEmbed',~{'default'=>'nil','on_replace'=>'update','on_type_not_found'=>'raise','type_field'=>#{#<95>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']]),
#<116>(8,1,'integer',['unsigned'|['big']]),
#<121>(8,1,'integer',['unsigned'|['big']]),
#<112>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']])}#,'types_metadata'=>[~{'identify_by_fields'=>[],'module'=>'Elixir.MyApp.Channel.SMS','type'=>#{#<115>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<115>(8,1,'integer',['unsigned'|['big']])}#}~|[~{'identify_by_fields'=>[],'module'=>'Elixir.MyApp.Channel.Email','type'=>#{#<101>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<97>(8,1,'integer',['unsigned'|['big']]),
#<105>(8,1,'integer',['unsigned'|['big']]),
#<108>(8,1,'integer',['unsigned'|['big']])}#}~]]}~},'date'=>'utc_datetime','id'=>'id','text'=>'string'}~
-| [{'function',{'__changeset__',0}}] )
'__schema__'/1 =
%% Line 38
( fun (_0) ->
( case ( _0
-| [{'function',{'__schema__',1}}] ) of
<'prefix'> when 'true' ->
'nil'
<'source'> when 'true' ->
#{#<114>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<105>(8,1,'integer',['unsigned'|['big']]),
#<110>(8,1,'integer',['unsigned'|['big']]),
#<100>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<114>(8,1,'integer',['unsigned'|['big']]),
#<115>(8,1,'integer',['unsigned'|['big']])}#
<'fields'> when 'true' ->
['id'|['date'|['text'|['channel']]]]
<'query_fields'> when 'true' ->
['id'|['date'|['text'|['channel']]]]
<'primary_key'> when 'true' ->
['id']
<'hash'> when 'true' ->
109728772
<'read_after_writes'> when 'true' ->
[]
<'autogenerate_id'> when 'true' ->
{'id','id','id'}
<'autogenerate'> when 'true' ->
[]
<'autoupdate'> when 'true' ->
[]
<'loaded'> when 'true' ->
~{'__meta__'=>~{'__struct__'=>'Elixir.Ecto.Schema.Metadata','context'=>'nil','prefix'=>'nil','schema'=>'Elixir.PolymorphicEmbedBug','source'=>#{#<114>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<105>(8,1,'integer',['unsigned'|['big']]),
#<110>(8,1,'integer',['unsigned'|['big']]),
#<100>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<114>(8,1,'integer',['unsigned'|['big']]),
#<115>(8,1,'integer',['unsigned'|['big']])}#,'state'=>'loaded'}~,'__struct__'=>'Elixir.PolymorphicEmbedBug','channel'=>'nil','date'=>'nil','id'=>'nil','text'=>'nil'}~
<'redact_fields'> when 'true' ->
[]
<'virtual_fields'> when 'true' ->
[]
<'query'> when 'true' ->
~{'__struct__'=>'Elixir.Ecto.Query','aliases'=>~{}~,'assocs'=>[],'combinations'=>[],'distinct'=>'nil','from'=>~{'__struct__'=>'Elixir.Ecto.Query.FromExpr','as'=>'nil','hints'=>[],'prefix'=>'nil','source'=>{#{#<114>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<105>(8,1,'integer',['unsigned'|['big']]),
#<110>(8,1,'integer',['unsigned'|['big']]),
#<100>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<114>(8,1,'integer',['unsigned'|['big']]),
#<115>(8,1,'integer',['unsigned'|['big']])}#,'Elixir.PolymorphicEmbedBug'}}~,'group_bys'=>[],'havings'=>[],'joins'=>[],'limit'=>'nil','lock'=>'nil','offset'=>'nil','order_bys'=>[],'prefix'=>'nil','preloads'=>[],'select'=>'nil','sources'=>'nil','updates'=>[],'wheres'=>[],'windows'=>[],'with_ctes'=>'nil'}~
<'dump'> when 'true' ->
~{'channel'=>{'channel',{'parameterized','Elixir.PolymorphicEmbed',~{'default'=>'nil','on_replace'=>'update','on_type_not_found'=>'raise','type_field'=>#{#<95>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']]),
#<116>(8,1,'integer',['unsigned'|['big']]),
#<121>(8,1,'integer',['unsigned'|['big']]),
#<112>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']])}#,'types_metadata'=>[~{'identify_by_fields'=>[],'module'=>'Elixir.MyApp.Channel.SMS','type'=>#{#<115>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<115>(8,1,'integer',['unsigned'|['big']])}#}~|[~{'identify_by_fields'=>[],'module'=>'Elixir.MyApp.Channel.Email','type'=>#{#<101>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<97>(8,1,'integer',['unsigned'|['big']]),
#<105>(8,1,'integer',['unsigned'|['big']]),
#<108>(8,1,'integer',['unsigned'|['big']])}#}~]]}~}},'date'=>{'date','utc_datetime'},'id'=>{'id','id'},'text'=>{'text','string'}}~
<'load'> when 'true' ->
[{'id','id'}|[{'date','utc_datetime'}|[{'text','string'}|[{'channel',{'parameterized','Elixir.PolymorphicEmbed',~{'default'=>'nil','on_replace'=>'update','on_type_not_found'=>'raise','type_field'=>#{#<95>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']]),
#<116>(8,1,'integer',['unsigned'|['big']]),
#<121>(8,1,'integer',['unsigned'|['big']]),
#<112>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']])}#,'types_metadata'=>[~{'identify_by_fields'=>[],'module'=>'Elixir.MyApp.Channel.SMS','type'=>#{#<115>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<115>(8,1,'integer',['unsigned'|['big']])}#}~|[~{'identify_by_fields'=>[],'module'=>'Elixir.MyApp.Channel.Email','type'=>#{#<101>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<97>(8,1,'integer',['unsigned'|['big']]),
#<105>(8,1,'integer',['unsigned'|['big']]),
#<108>(8,1,'integer',['unsigned'|['big']])}#}~]]}~}}]]]]
<'associations'> when 'true' ->
[]
<'embeds'> when 'true' ->
[]
( <_1> when 'true' ->
( primop 'match_fail'
(( {'function_clause',_1}
-| [{'function',{'__schema__',1}}] ))
-| [{'function',{'__schema__',1}}] )
-| ['compiler_generated'] )
end
-| [{'function',{'__schema__',1}}] )
-| [{'function',{'__schema__',1}}] )
'__schema__'/2 =
%% Line 38
( fun (_0,_1) ->
( case <_0,_1> of
<'field_source','id'> when 'true' ->
'id'
<'field_source','date'> when 'true' ->
'date'
<'field_source','text'> when 'true' ->
'text'
<'field_source','channel'> when 'true' ->
'channel'
<'type','id'> when 'true' ->
'id'
<'type','date'> when 'true' ->
'utc_datetime'
<'type','text'> when 'true' ->
'string'
<'type','channel'> when 'true' ->
{'parameterized','Elixir.PolymorphicEmbed',~{'default'=>'nil','on_replace'=>'update','on_type_not_found'=>'raise','type_field'=>#{#<95>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']]),
#<116>(8,1,'integer',['unsigned'|['big']]),
#<121>(8,1,'integer',['unsigned'|['big']]),
#<112>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']]),
#<95>(8,1,'integer',['unsigned'|['big']])}#,'types_metadata'=>[~{'identify_by_fields'=>[],'module'=>'Elixir.MyApp.Channel.SMS','type'=>#{#<115>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<115>(8,1,'integer',['unsigned'|['big']])}#}~|[~{'identify_by_fields'=>[],'module'=>'Elixir.MyApp.Channel.Email','type'=>#{#<101>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<97>(8,1,'integer',['unsigned'|['big']]),
#<105>(8,1,'integer',['unsigned'|['big']]),
#<108>(8,1,'integer',['unsigned'|['big']])}#}~]]}~}
<'field_source',_4> when 'true' ->
'nil'
<'type',_5> when 'true' ->
'nil'
<'virtual_type',_6> when 'true' ->
'nil'
<'association',_7> when 'true' ->
'nil'
<'embed',_8> when 'true' ->
'nil'
( <_3,_2> when 'true' ->
( primop 'match_fail'
(( {'function_clause',_3,_2}
-| [{'function',{'__schema__',2}}] ))
-| [{'function',{'__schema__',2}}] )
-| ['compiler_generated'] )
end
-| [{'function',{'__schema__',2}}] )
-| [{'function',{'__schema__',2}}] )
'__struct__'/0 =
%% Line 38
( fun () ->
~{'__meta__'=>~{'__struct__'=>'Elixir.Ecto.Schema.Metadata','context'=>'nil','prefix'=>'nil','schema'=>'Elixir.PolymorphicEmbedBug','source'=>#{#<114>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<105>(8,1,'integer',['unsigned'|['big']]),
#<110>(8,1,'integer',['unsigned'|['big']]),
#<100>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<114>(8,1,'integer',['unsigned'|['big']]),
#<115>(8,1,'integer',['unsigned'|['big']])}#,'state'=>'built'}~,'__struct__'=>'Elixir.PolymorphicEmbedBug','channel'=>'nil','date'=>'nil','id'=>'nil','text'=>'nil'}~
-| [{'function',{'__struct__',0}}] )
'__struct__'/1 =
%% Line 38
( fun (_0) ->
let <_5> =
fun (_2,_1) ->
case <_2,_1> of
<{_X_@2,_X_@3},_X_@4> when 'true' ->
call 'maps':'update'
(_X_@2, _X_@3, _X_@4)
( <_4,_3> when 'true' ->
primop 'match_fail'
({'function_clause',_4,_3})
-| ['compiler_generated'] )
end
in call 'Elixir.Enum':'reduce'
(( _0
-| [{'function',{'__struct__',1}}] ), ~{'__meta__'=>~{'__struct__'=>'Elixir.Ecto.Schema.Metadata','context'=>'nil','prefix'=>'nil','schema'=>'Elixir.PolymorphicEmbedBug','source'=>#{#<114>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<109>(8,1,'integer',['unsigned'|['big']]),
#<105>(8,1,'integer',['unsigned'|['big']]),
#<110>(8,1,'integer',['unsigned'|['big']]),
#<100>(8,1,'integer',['unsigned'|['big']]),
#<101>(8,1,'integer',['unsigned'|['big']]),
#<114>(8,1,'integer',['unsigned'|['big']]),
#<115>(8,1,'integer',['unsigned'|['big']])}#,'state'=>'built'}~,'__struct__'=>'Elixir.PolymorphicEmbedBug','channel'=>'nil','date'=>'nil','id'=>'nil','text'=>'nil'}~, _5)
-| [{'function',{'__struct__',1}}] )
'changeset'/2 =
%% Line 51
( fun (_0,_1) ->
let <_2> =
call %% Line 53
'Elixir.Ecto.Changeset':%% Line 53
'cast'
(_0, _1, %% Line 53
['date'|['text']])
in let <_3> =
call %% Line 54
'Elixir.PolymorphicEmbed':%% Line 54
'cast_polymorphic_embed'
(%% Line 53
_2, %% Line 54
'channel', %% Line 54
[{'required','true'}])
in %% Line 55
call 'Elixir.Ecto.Changeset':'validate_required'
(_3, 'date')
-| [{'function',{'changeset',2}}] )
'module_info'/0 =
( fun () ->
call 'erlang':'get_module_info'
('Elixir.PolymorphicEmbedBug')
-| [{'function',{'module_info',0}}] )
'module_info'/1 =
( fun (_0) ->
call 'erlang':'get_module_info'
('Elixir.PolymorphicEmbedBug', ( _0
-| [{'function',{'module_info',1}}] ))
-| [{'function',{'module_info',1}}] )
end%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment