Key inclusion criteria:  Male participant or female participant of non-childbearing potential. Non-child-bearing potential being defined as surgically sterilised (i.e. documented hysterectomy, bilateral salpingectomy or bilateral oophorectomy) or being postmenopausal (defined as no menses for 12 months without an alternative medical cause) prior to the day of screening. Aged 18-64 years (both inclusive) at the time of signing informed consent. Diagnosed with type 1 diabetes mellitus 1 year or more before screening. Current daily basal insulin treatment greater than 0.2 and below or equal to 0.5 (I)U/kg/day. Current total daily insulin treatment between 0.4 and 0.8 (I)U/kg/day (both inclusive). Body mass index between 18.5-29.9 kg/m^2 (both inclusive). HbA1c (glycated haemoglobin) below or equal to 8.0%.  Key exclusion criteria:  Male of reproductive age who, or whose female partner(s), is not using an adequate contraceptive method (adequate contraceptive measures as required by local regulation or practice). Adequate contraceptive measures include that the male participant uses a condom during intercourse and that the partner practices adequate contraception (risk of pregnancy must be lower than 1%). In addition, participants must not donate sperm for the duration of the study.